我是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