用vb.net附加sql数据库 [英] attach sql database with vb.net
本文介绍了用vb.net附加sql数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何将我的sql数据库附加到vb.net应用程序而不是单独的文件
how do i attach my sql database with vb.net application rather than separate file
推荐答案
可以使用名称空间"Microsoft. SqlServer.Management.Smo"
请参考以下链接以获取更多详细信息
http://msdn.microsoft.com/en-us/library/microsoft.sqlserver.management.smo.server.attachdatabase.aspx [
This can be done using the api exists in name space "Microsoft.SqlServer.Management.Smo"
Please refer following link for more detail
http://msdn.microsoft.com/en-us/library/microsoft.sqlserver.management.smo.server.attachdatabase.aspx[^]
^ ]也可能有帮助.
This[^] may help as well.
附加操作可以是连接字符串的一部分.参见 http://www.connectionstrings.com/sql-server-2008 [
The attach operation can be part of the connection string. See http://www.connectionstrings.com/sql-server-2008[^].
Then if you want to include the database file to your project, you can just add it to the existing project and include it as a copy file to the output.
这篇关于用vb.net附加sql数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文