In the code below, the transaction and error trapping are not working. I am updating a record. There are other fields in the record, but they don&#039t need updating.<BR><BR>IF there is an error, it’s supposed to rollback transaction and then Redirect to the homepage.<BR>If there is no error, it’s supposed to commit transaction and then Write “Committed transaction”<BR><BR>However, the code below makes the update in the database(which means, no error) and then goes to the homepage.(which means there was an error).<BR>It does not, of course, display “Committed transaction” <BR><BR>(1) What can I do to make the transaction work?<BR>(2) How can I trap the specific error, know what it is, and save it somewhere?<BR>(3) Where is that somehwere to put that error message.<BR><BR>Thanks a lot for your help.<BR><BR><BR>%@ Language=VBScript %&#062;<BR>&#060;%Response.Buffer=True%&#062; <BR>&#060;%<BR>On Error Resume Next<BR><BR>Dim iRegID <BR>iRegID= CInt(Request.Form("regid"))<BR><BR>&#039Connect to database<BR>Application("csnConnectionString") = "Driver=Microsoft Access Driver (*.mdb);DBQ=C:InetPubwwwrootMywebsiteMyDB.mdb;data base=MyDB.mdb;uid=;pwd=;" <BR><BR>Set Conn = Server.CreateObject("ADODB.Connection")<BR>Conn.Op en(Application("csnConnectionString"))<BR>Set RS = Server.CreateObject("ADODB.Recordset")<BR><BR>strS ql = "SELECT FirstName,LastName,Company, "<BR>strSql = strSql & " FROM MyTable WHERE RegistrationID= " & iRegID<BR><BR>RS.Open strSql,Conn,3,3 <BR><BR>BEGIN TRANSACTION <BR>‘insert form data into the database table(update record) <BR>RS("FirstName")=Request.Form("fname")<BR>RS("L astName")=Request.Form("lname")<BR>RS("Company")=R equest.Form("Company")<BR>RS.Update<BR><BR>If Err.Number &#062; 0 Then &#039an error occurred<BR> ROLLBACK TRANSACTION <BR> Response. Redirect "Homepage.htm"<BR>Else<BR> Commit Transaction<BR> Response.Write "Committed Transaction"<BR>End If <BR> <BR>