|Do you know where your variables are?|
SQL Server Compact Edition (SQL CE) on Windows 7 (64bit)by ig (Vicar)
|on May 27, 2011 at 23:01 UTC||Need Help??|
ig has asked for the
wisdom of the Perl Monks concerning the following question:
I would like to access a SQL CE database from Perl on Windows 7 and would prefer something that works on Strawberry Perl. I have tried a few ADO connection strings with DBI and DBD::ADO without success. Has anyone done this? Any suggestions? It doesn't have to be DBI, though that would be nice.
update: changed the title for clarity.
update: It looks like ODBC isn't the way to go. See, for example, http://social.msdn.microsoft.com/Forums/en/sqlce/thread/320df64a-60d8-4865-97f2-cc42fef628b4 or http://www.sqlservercompactodbc.com/.
update: Another suggestion of DBD::ADO: http://stackoverflow.com/questions/379765/is-there-a-perl-dbi-driver-for-sql-server-compact-3-5
update: It may be relevant that I am running 64bit Windows 7.
update: It is possible!!
Thanks to Corion for suggestions and encouragement to keep trying.
This script lists all the tables in the sample Northwinds database:
I ran this with Strawberry Perl on Windows 7 64bit with both 32bit and 64bit versions of SQL Server Compact Edition 3.5 SP2 installed. I also had SQL Server 2008 Express, Visual Studio and Microsoft Office 2010 installed, any of which may or may not have been relevant - I never have understood the way Microsoft chooses to bundle their products.
This is perl, v5.10.1 (*) built for MSWin32-x86-multi-thread Copyright 1987-2009, Larry Wall
update: I must have been having a very bad day yesterday: not only did I fail with Super Search and Google, but what I tried to try first now works as expected. The only software I installed in the mean time is Books On Line for SQL Server Compact Edition - I don't think that would have installed oledb provider. Anyway, this also is working this morning:
update: I'm an idiot! I had an extra 'D' in my connection string yesterday: Provider=Microsoft.SQLSERVER.CE.OLDEDB.3.5;