CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    May 2011
    Posts
    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

  2. #2
    Join Date
    Dec 2009
    Posts
    18

    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
  •  





Click Here to Expand Forum to Full Width

Featured