本文介绍了不想在server2008对象资源管理器窗口中显示数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有.mdf&我的项目目录文件夹中的.ldf文件.
我通过编程&连接了该.mdf文件.每当我打开SQL SERVER2008 Management Studio时,都会将此附件数据库显示到server2008对象资源管理器窗口的左窗格中.

我的编程代码如下:-
------------------

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:-
------------------

Dim con As SqlConnection = New SqlConnection()
con.ConnectionString = "Server=.\MSSQLSERVER2008;AttachDbFilename=|DataDirectory|Test.mdf;Database=TestDB;Trusted_Connection=yes"
con.Open()


但是我想通过编程连接时,此附件数据库将不会显示在server2008对象资源管理器窗口的左窗格中.

有可能吗?
请帮助我任何指示....


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....

推荐答案


这篇关于不想在server2008对象资源管理器窗口中显示数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-28 06:33