Friday, February 24, 2012

connecting my VB database to SQL Server Managment Studio?

hi

i have created a sql database in visual studio pro and now i would like to connect to that database in SQL server managamenet studio. so when i start SQL server i connect to the same instance as my database (wich is .\SQLEXPRESS) but i can't find my database in the object explorer?

when you created the database in VB did you connect to a file rather than a database? This means that you have used a user instance, in that case the database is attached to a different instance of the server than .\sqlexpress. If you remember the path to the database then just right click on the databases folder and select attach db and then browse to the file, the db should now appear.

However I will say that once the file is attached to sql server theny ou can no longer use it as a file as I think you were, you will need to change the connection string in your VB app, you can do this using the same wizard that you you used but by selecting a different option.

No comments:

Post a Comment