连接字符串无效

时间:2016-05-13 18:19:46

标签: c# asp.net sql-server

显然这个连接字符串不正确?     connectionString =“Server = mydb.com:1433 / sqlExpress; Database = d; User Id = d; Password = pw;”

1 个答案:

答案 0 :(得分:2)

第一个认为我看到的是你输入错误的部分

Server=mydb.com:1433

使用

Server=mydb.com,1433

sql server使用逗号分隔端口。

另请查看答案:Setting up connection string in ASP.NET to SQL SERVER