By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,541 Members | 1,525 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,541 IT Pros & Developers. It's quick & easy.

Connecting to MS SQL Server SDF file

P: 1
I just installed Microsoft Visual Studio 2008 Express edition, and it installs some sort of stripped down version of SQL Server. It comes with no tools for connecting to your "local" database, creating tables, etc., but it does allow you to create database files in SDF format within the IDE.

My question is: How do you then connect to these database files in Perl? I tried creating an ODBC connection, but there seems to be no way to tie an ODBC alias to this file. I've searched the web in vein trying to a way to make a connection to this file directly, but to no avail.

In short, I want to create a database connection to a file called Database1.sdf, which has a table in it called 'entry', and then query the table.

I had hoped it would be as easy as connecting to an Access file, but not!

Any help would be appreciated. Thanks.

Bob.
Sep 9 '09 #1
Share this Question
Share on Google+
2 Replies


Icecrack
Expert 100+
P: 174
I think you should ask the ms sql experts on Bytes under SQL Server, because if you can not connect to the database from a console then i dont think you can connect to it from perl (i maybe wrong), when you set up MVS did you set up a username and password for ms sql?
Sep 10 '09 #2

numberwhun
Expert Mod 2.5K+
P: 3,503
I have to agree with Icecrack, you have to be able to connect to the database normally if you are going to connect to it with Perl. If you have just set it up, then ensure, as was mentioned, that you have a user and password set up to access the database.

After that, you can use the examples outlined here to try and connect. It does look like you will have to use the DBD::ODBC module.

As Icecrack mentioned, if you are having issues simply connecting to the database, then you will have to make a post in the mssql forum to help to get that issue resolved first.

Regards,

Jeff
Sep 10 '09 #3

Post your reply

Sign in to post your reply or Sign up for a free account.