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
Re: Database connection problem