1
SqlConnection con = new SqlConnection("Data source=BIMESH-PC\SQLEXPRESS;initial catalog=LibrSystem;integrated security=true");
在此代碼中,轉義序列是不可接受的。 請糾正這段代碼。MS SQL SERVER 2008r2與Visual Studio 2012的連接
SqlConnection con = new SqlConnection("Data source=BIMESH-PC\SQLEXPRESS;initial catalog=LibrSystem;integrated security=true");
在此代碼中,轉義序列是不可接受的。 請糾正這段代碼。MS SQL SERVER 2008r2與Visual Studio 2012的連接
你可以嘗試要麼
SqlConnection con = new SqlConnection(@"Data source=BIMESH-PC\SQLEXPRESS;initial catalog=LibrSystem;integrated security=true");
SqlConnection con = new SqlConnection("Data source=BIMESH-PC\\SQLEXPRESS;initial catalog=LibrSystem;integrated security=true");
You should have a look at verbatim string literals, and escaped string literals
你可以試試這個也:'的SqlConnection CON =新的SqlConnection(); con.connectionstring = @「Data source = BIMESH-PC \ SQLEXPRESS; initial catalog = LibrSystem; integrated security = true」;' –