我试图让到SQL Server数据库(托管在本地主机)的连接,但不断收到在标题中提到的错误。
Application("ConnectionString") = "Provider=SQLOLEDB;Data Source=localhost\SQLExpress;Database=mydb;Trusted_Connection=yes;UID=dbadmin; PWD=dbadmin"
Application("ConnectionTimeout") = 15
Application("CommandTimeout") = 90
Application("CursorLocation") = 3
strQuery = "select * from dec_users"
Set objDBConnection = Server.CreateObject("ADODB.Connection")
objDBConnection.open Application("ConnectionString")
Set RS = Server.CreateObject("ADODB.RecordSet")
RS.Open strQuery, objDBConnection
有任何想法吗?