经典ASP与SQL 2008中的多个数据库连接

经典ASP与SQL 2008中的多个数据库连接

问题描述:

我有一个页面(default.asp),因为现在我需要连接来自两个不同数据库的数据。我的问题是我不断收到此错误经典ASP与SQL 2008中的多个数据库连接

“多步OLE DB操作生成错误。检查每个OLE DB状态值,如果可用,没有工作完成。”

添加以下连接我的网站从细的工作,包括文件connection..I发现它不报错了对conn.Open

<% 
     Set conn = Server.CreateObject("ADODB.Connection") 
     conn.ConnectionString = "Provider=SQLNCLI10.1;Integrated Security=True;Persist Security Info=False;Initial Catalog=member;Data Source=608;" 
     conn.Open 
     conn.Close 
%> 

任何建议,我可以在这里做之前? Ps这一个硬编码到页面本身。

这是一个非常常见的错误消息,您需要检查连接上的错误收集,这样的事情应该给你更多的信息:

<% 
for each objErr in objConn.Errors 
    response.write("<p>") 
    response.write("Description: ") 
    response.write(objErr.Description & "<br />") 
    response.write("Help context: ") 
    response.write(objErr.HelpContext & "<br />") 
    response.write("Help file: ") 
    response.write(objErr.HelpFile & "<br />") 
    response.write("Native error: ") 
    response.write(objErr.NativeError & "<br />") 
    response.write("Error number: ") 
    response.write(objErr.Number & "<br />") 
    response.write("Error source: ") 
    response.write(objErr.Source & "<br />") 
    response.write("SQL state: ") 
    response.write(objErr.SQLState & "<br />") 
    response.write("</p>") 
next 
%>