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

In a Jam, need help quick-Mdf Files

P: 1
Sorry If this has been asked 1000 times but in a bind..Need simple code using Visual Basic 2005 on how to open a SqlExpress MDF file..How to extract the data would help also..I can open an MDB file with VB5 and extract data no problem. Was told last night I had to do this in Visual Basic 2005 and would by usuing SqlServer Express.And done by monday..Done the Interface not do much of a learning curve,,but the database connection is stalling me.
Any help, pointer to help would be most welcome.
Thanks
Apr 22 '07 #1
Share this Question
Share on Google+
1 Reply


SammyB
Expert 100+
P: 807
Sorry If this has been asked 1000 times but in a bind..Need simple code using Visual Basic 2005 on how to open a SqlExpress MDF file..How to extract the data would help also..I can open an MDB file with VB5 and extract data no problem. Was told last night I had to do this in Visual Basic 2005 and would by usuing SqlServer Express.And done by monday..Done the Interface not do much of a learning curve,,but the database connection is stalling me.
Any help, pointer to help would be most welcome.
Thanks
I've not done any SqlExpress, but a quick google search had http://www.sitepoint.com/article/hos...ql-server-2005 on top. It seems to have all the information that you need. It is written for C#, but it's pretty easy to translate to VB: usually just rearrange & drop the semicolon. It has this line that seem pertinent to you (I translated to VB)
Expand|Select|Wrap|Line Numbers
  1. Dim conn As New System.Data.SqlClient.SqlConnection("connection string")
But, I don't do databases, so it's easy for me! HTH --Sam
Apr 22 '07 #2

Post your reply

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