来自mdf文件的数据库对象 [英] Database object from mdf file
本文介绍了来自mdf文件的数据库对象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我可以从mdf文件获取Database对象,就像我们在SMO中使用一样。
数据库db = new DatbaseFromFile(abc.mdf); //类似的东西(我使用c#)
解决方案
在Connectionstring.com中查看此页面,它显示了如何通过连接字符串附加数据库。查找标题连接到本地SQL Server Express实例时附加数据库文件
www.Connectionstrings.com [ ^ ]
Can i get Database object from mdf file, like we use in SMO.
Database db=new DatbaseFromFile("abc.mdf"); // something like that (i m using c#)
解决方案
Have a look at this page in Connectionstring.com it shows how to attach a database through the connection string. Look for the headings "Attach a database file on connect to a local SQL Server Express instance"
www.Connectionstrings.com[^]
这篇关于来自mdf文件的数据库对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文