We have an ASP Classic legacy web application, which is hosted in Windows Server 2003 in IIS, that connect in our database server, which is an AS/400. We've just currently upgrade our database server from v5r4m0 to v6r1m0, so we install an update in our Web Server to connect to the new database server and change all the connection string to the proper database server.
We have this code in our ASP Classic site:
set objConn2 = server.CreateObject("ADODB.Connection")
objConn2.open connStringGlobal
objConn2.BeginTrans
if rsCheck.eof then
objConn2.execute(InsertQuery)
objConn2.execute(InsertQueryRCDREF)
objConn2.execute(UpdateQuery)
end if
objConn2.CommitTrans
if err.number <> 0 then
session("errMsg") = "An error occured while processing your request. Please try again. <br><br>[Error Description : " & err.Description & "]<br><br>" & InsertQuery & "<br><br>" & UpdateQuery & "<br><br>" & InsertQueryRCDREF
objConn2.RollBackTrans
objConn2.close
set objConn2 = nothing
response.Redirect(request.ServerVariables("HTTP_REFERER"))
else
objConn2.close
set objConn2 = nothing
response.Redirect("default.asp?p=pending")
end if
But it throws an error in the objConn2.BeginTrans
line which is:
CWBZZ5008 Security error occurred when attempting to connect to system
What happen here is that the connection is opened and the line with objConn2.execute
is executed, the data are inserted in our database eventhough it goes through the rollback transaction and close connection and shows the error message in the UI.
Here's what we have tried so far:
But still we have no luck. This site is currently on production, which is stopped because of this error, so we really need to fix this and were already trying to fix this for days. Please we really need help.
Our other site which run in the same server and also in ASP Classic that connect to the same database server with transaction works fine, only this site with this code throws an error.
The problem was because the migrated tables from the old database server to the new database server doesn't have any journal yet so the error occur when using the transaction.
A journal maintains an audit trail of transactions and database changes. Transaction logs and Database change logs are used, a transaction log records all the essential data for each transactions, including data values, time of transaction and terminal number. A database change log contains before and after copies of records that have been modified by transactions. - wikipedia.org