简体   繁体   English

与SQL Server 2005 MDF文件的C#.net数据库连接

[英]C#.net db connection with sql server 2005 MDF file

After creating the setup file in c#.net WPF application, couldnot connect with the sqlserver 2005 MDF file. 在c#.net WPF应用程序中创建安装文件后,无法与sqlserver 2005 MDF文件连接。

The setup file is including the sqlserver MDF file. 安装文件包括sqlserver MDF文件。

plz tell me, what is connection problem? 请告诉我,什么是连接问题?

Just a wild guess (see comments on your question): You're trying to use the "user instance" feature that was introduced in SQL Server 2005? 只是一个疯狂的猜测(请参阅您的问题的注释):您是否正在尝试使用SQL Server 2005中引入的“用户实例”功能? Then the SQL Server 2005 needs to be installed on the target machine as well - maybe only the Express edition. 然后,还需要在目标计算机上安装SQL Server 2005-也许只有Express版本。 As long as you don't install the SQL Server there's no way you get a connection to your shipped MDF file. 只要不安装SQL Server,就无法连接到出厂的MDF文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM