I have a site that I moved from a Windows 2003 Server to a Server 2008. This site uses a CMS portal system. In the config routine it verifies the db connection and will only load if there are no errors. I am getting the error:
"-2147217887 : Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done."
I have already tried the solutions provided here: http://forums.iis.net/t/1091950.aspx. As well as everything else I have found searching these forums, MS support, and elsewhere.
Now for the part that has really given me trouble trying to solve the problem. I have created two pages to isolate the issue, one with the error check and one without.
------------------------------------------------------------------------
<!-- #include file="includes/inc_ADOVBS.asp" -->
<html>
<head>
<title>Test</title>
</head>
<body>
<%
Dim strDBPath, strConnString, my_Conn, rs
strDBPath = Server.MapPath("******/******.mdb")
strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strDBPath
on error Resume Next
Set my_Conn = Server.CreateObject("ADODB.Connection")
my_Conn.Errors.Clear
my_Conn.Open strConnString
If my_conn.Errors.Count <> 0 Then
For counter = 0 To my_conn.Errors.Count -1
ConnErrorNumber = my_conn.Errors(counter).Number
ConnErrorDesc = my_conn.Errors(counter).Description
If ConnErrorNumber <> 0 Then
strtemp = "<p>" & ConnErrorNumber & " : " & ConnErrorDesc & "</p>"
End If
Next
my_conn.Errors.Clear
Set my_Conn = Nothing
on error goto 0
Response.Write strtemp
End If
%>
</body>
</html>
------------------------------------------------------------------------
<!-- #include file="includes/inc_ADOVBS.asp" -->
<html>
<head>
<title>Test</title>
</head>
<body>
<%
Dim strDBPath, strConnString, my_Conn, rs
strDBPath = Server.MapPath("******/******.mdb")
strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strDBPath
set my_Conn = Server.CreateObject("ADODB.Connection")
my_Conn.Open strConnString
Set rs = my_Conn.Execute ("SELECT * FROM PORTAL_MEMBERS WHERE MEMBER_ID=1;")
OrigName = rs.fields("m_username")
response.write "<p>Original Username = " & OrigName & "</p>"
Set rs = my_Conn.Execute ("UPDATE PORTAL_MEMBERS SET m_username='BadName' WHERE MEMBER_ID=1;")
Set rs = my_Conn.Execute ("SELECT * FROM PORTAL_MEMBERS WHERE MEMBER_ID=1;")
response.write "<p>New Username = " & rs.fields("m_username")& "</p>"
Set rs = my_Conn.Execute ("UPDATE PORTAL_MEMBERS SET m_username='" & OrigName & "' WHERE MEMBER_ID=1;")
Set rs = my_Conn.Execute ("SELECT * FROM PORTAL_MEMBERS WHERE MEMBER_ID=1;")
response.write "<p>Reset Username = " & rs.fields("m_username")& "</p>"
set my_Conn = nothing
%>
</body>
</html>
------------------------------------------------------------------------
The first page gives the error, the second page runs with no trouble. Obviously I can connect to the db, and have permissions to make changes, but then why do I get the error in the other routine. I have tried to remove the error check from the CMS portal, but then it fails elsewhere. I feel that if I can get this issue resolved, the rest of the portal should probably work as well.