我是C#和SQL Server的初学者。目前我正在开发一个程序,问题是我的数据库文件位于项目文件夹内的DB文件夹中。当我改变数据源到这个如何更改SQL连接字符串数据源?
"Data Source=db/test.mdf;Initial Catalog=test;Integrated Security=true"
它给出了一个错误
"Data Source=localhost;Initial Catalog=test;Integrated Security=true"
:当我尝试分离在SQL Server Management Studio中的数据库文件时,它给出了一个错误。我不知道如何将项目数据库文件插入InstallShield来创建安装文件。
检查此问题http://stackoverflow.com/questions/173209/how-do-i-connect-to-an-mdf-microsoft-sql-server-database-file-in-a-simple-web – 2012-07-13 14:50:20