|
-
Dec 4th, 2006, 11:20 PM
#1
Thread Starter
Lively Member
Unable to connect to the Pubs.mdf database file
Hi,
I am using vb2005 to try to connect to the PUB.MDF database file. I copied the file into the same folder as the vb code files.
I used the statement below as the sqlConnection:
dim myConnection as SqlConnection = new _
SqlConnection("server=(local);database=pubs;uid=sa;pwd=")
When the program runs, there was a run time error and vb highlighted the line "myConnection.open()" and said that there was an error connecting to the database.
How do I solve this problem?
I did not set any password and userID to the database file. I tried removing the uid and pwd parameters but the error remains.
Last edited by LiLo; Dec 8th, 2006 at 02:52 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|