|
-
May 22nd, 2011, 12:27 AM
#1
Database connection problem
Hi, im a absolute beginner to programming. And im experiencing problems with establishing a connection to my databases. I capture the exception in a messagebox wich says:
"The specified schema name "dbUsers" either does not exist or you do not have permission to use it."
I have been following several different tutorials, that tells me to establish the connection this way:
CODE:
{
SqlConnection connUser = new SqlConnection();
private void btnNewUser_Click(object sender, EventArgs e)
{
connUser.ConnectionString= "DataSource=.\\SQLEXPRESS;AttachDbFilename=C:\\Robin\\Programmering\\Petproject\\Program\\Contact Manager\\Contact Manager\\dbUsers.mdf;Integrated Security=True;User Instance=True";
connUser.Open();
}
}
Please tell me what im doing wrong.
/Robin
-
May 24th, 2011, 05:00 PM
#2
Re: Database connection problem
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
|