Permission to connect a database

  • I am new here and new to SQLExpress. Just went through Teach Yourself MSVS and loaded MS SQL Express. So, I am pretty new to this forum as well as the tools I am trying to pickup.

    I run into this problem in MSVS 2013 VB and would appreciate some pointers.

    I tried to connect a database to a project. In the project, I have checked the proper references (System.Data, System.Data.SqlClient). I tried to add connection but I got the following error message:

    MyTestDB.mdf

    You don't have permission to open this file.

    Contact the file owner or an administrator to obtain permission.

    I've created MyTestDB.mdf with SQL Express. Why am I, not having permission for a file I created?

    And how to correct this problem?

    Thanks.

  • Mystery solved!

    I went in the file thru Windows Explorer and added a user object and assigned full right and it worked.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply