通过编程方式连接server2008而不还原数据库 [英] To connect the server2008 through programmetically without restore the database
本文介绍了通过编程方式连接server2008而不还原数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在计算机上安装了sql server2008.
我已经在指定位置创建了一个数据库文件(.mdf,.log).
我没有在server2008中创建数据库,但是有数据库.mdf.
我想通过编程方式连接该.mdf数据库文件,而无需在sql server2008中创建数据库(即在左窗格中未显示该数据库).
我将如何解决上述问题????
请帮助我解决该问题的任何说明......
I install sql server2008 in my computer.
I have create a database file(.mdf,.log) in my specifying location.
I have not create the database in server2008 but have database .mdf.
I want to do that i connect that .mdf database file through programmetically without create the database in sql server2008(i.e. not shown the database in left pane).
How will i solve that above problems????
Please help me any instruction to solve that.....
推荐答案
看看 ^ ]-大约在附加数据库文件"的三分之一处
Have a look at ConnectionStrings.com[^] - about a third of the way down "Attach a database file"
这篇关于通过编程方式连接server2008而不还原数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文