2013-08-12 74 views
0

我試圖從傳統的ASP頁面連接到SQL Server 2008:提供程序錯誤80040e21經典ASP的SQL Server 2008

Set conn = Server.CreateObject("ADODB.Connection") 
conn.ConnectionString = " 
Provider= SQLOLEDB.1 
DataBase= MYDBNAME 
Server= SERVERNAME\INSTANCE 
Integrated Security = True 
Trusted_Connection=Yes 
Persist Security Info = False" 

conn.Open -> error 80040e21 Multiple-step OLEDB operation generated errors 
sql = "select * from UsersQuery where ID=" & ID 
Set rs = conn.Execute(sql) 

在SQL Server日誌,我可以看到連接成功:

用戶'dbuser'登錄成功使用Windows進行連接 身份驗證。

什麼是導致錯誤?

謝謝。

回答

0

有用嗎?

Provider = SQLNCLI11; Server = ServerName \ Instance; Database = MYDBNAME; Integrated Security = SSPI; DataTypeCompatibility = 80; MARS Connection = True;

相關問題