开发者

Multiple database connection in classic ASP with SQL 2008

I have a page (default.asp) where as of right now i need to connect data from two different databases. My problem is I keep getting this error

"Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done."

Before adding the following connection my site worked fine from a the includes file connection..I found o开发者_StackOverflow中文版ut it does error out on 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
 %>

Any suggestions as to what I can do here? Ps this one is hardcoded into the page itself.


That is a very common error message, you need to check the errors collection on the connection, something like this should give you more info:

<%
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
%>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜