VS VB Express 2010 Cannot Connect to SQL Express Database

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • BikeToWork
    New Member
    • Jan 2012
    • 124

    VS VB Express 2010 Cannot Connect to SQL Express Database

    I am confused by database connections in the VS 2010 VB Express version I installed recently. I want it to connect to an existing database in an instance of SQL Server Express (2008R2) I have installed on the same computer but each time I try, it keeps prompting me for a "SQL Server Database File" rather than connecting to the server and letting me choose a database. I thought "SQL Server Database File" means an MDF file, but when I try to browse to an MDF, I get "Access denied." How does one establish a connection to an existing SQL Express instance and connect to a particular database? Thank you in advance for any advice.
  • Vikki McCormick
    New Member
    • Aug 2010
    • 46

    #2
    Have you tried to connect through Server Explorer? Hit Control/Alt "S", then "Add Connection" and a dialog pops up that will guide you through the steps.

    Comment

    • kadghar
      Recognized Expert Top Contributor
      • Apr 2007
      • 1302

      #3
      ¿Can you share your connection method and your connection string?, perhaps you're looking for a file instead of connecting to a server.

      Comment

      • BikeToWork
        New Member
        • Jan 2012
        • 124

        #4
        Unfortunately, VS 2010 VB Express only gives me one option to connect to SQL Server and that is via a "SQL Server File." When I browse to an MDF file, I get "Access Denied." There is no option for SQL Server or SQL Server Client in the dropdown list, just Access and SQL Server file. I must have downloaded the stripped down version of VS2010 VB Express...

        Comment

        • NeoPa
          Recognized Expert Moderator MVP
          • Oct 2006
          • 32636

          #5
          This seems like a Visual Studio question rather than a SQL Server one. I'll move it for you to see if that produces any further help.

          Comment

          Working...