2016-04-22 23 views
0

在dbcon錯誤信息被拋出:登錄失敗,同時驗證數據庫

Data Source=.\sqlexpress;Initial Catalog=fdbr;User ID=sa;Pwd=pass123;MultipleActiveResultSets=true; Integrated Security=false; 

則拋出Error在這行代碼:

objLib.SetReportConnection(objcr); 
+0

您確定這是用戶的正確憑據嗎?是授權訪問數據庫fdbr的用戶嗎?你需要確認這一點。 –

回答

0

連接字符串,大概就是這個樣子,如果您使用本地服務器

Data Source=(localdb)\v11.0;Initial Catalog=fdbr;user id=sa;password=pass123;MultipleActiveResultSets=true; Integrated Security=true; 

此鏈接可能會幫助你https://www.connectionstrings.com/sql-server/