Click here to Skip to main content
15,887,135 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have .mdf & .ldf file in my project directory folder.
I connected that .mdf file by the programming & shown this attachment Database into left pane of server2008 object Explorer windows whenever i open SQL SERVER2008 Management Studio.

My programming code is below:-
------------------
VB
Dim con As SqlConnection = New SqlConnection()
con.ConnectionString = "Server=.\MSSQLSERVER2008;AttachDbFilename=|DataDirectory|Test.mdf;Database=TestDB;Trusted_Connection=yes"
con.Open()

But I want to do that this attachment database will not show in left pane of the server2008 object Explorer windows when i connect by the programming...

Is it possible???
Please help me any instruction....
Posted
Updated 2-Aug-12 22:41pm
v2

1 solution

What are talking about??

If you attach the database to the SQL Server instance, it WILL show up in SQL Server Manager Studio and there is no way around that.

Well, unless you DETACH the database from the SQL Server instance, in which case it'll make your database unusable but Management Studio AND your application.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900