<%@ Language=VBScript %>
<%Option Explicit%>
<%
'========================================
DIM NDEBUG_MSG
NDEBUG_MSG=TRUE
IF NDEBUG_MSG = TRUE THEN
'出错过滤
ON ERROR RESUME NEXT
END IF
'===============END =====================
……………(代码略)
'数据事务处理-start
If Err.number = 0 Then
'~~~~~ Open database and begin transaction ~~~~~~~~~~~~~~~~~~~~
'------------------------------
'-------------------------------------
objConn.BeginTrans
objConn.Execute (objSQL)
'~~~~~~ Commit the transaction and close the database connection
objConn.CommitTrans
Response.CacheControl ="Private"
Response.Expires = -1
……………(代码略)
Else
'~~~~~ Rollback transactions and close objects
objConn.RollbackTrans
'~~~~~ Raise errors for asp page
'Err.Raise Err.Number, Err.Source, Err.Description
'Err.Clear
Response.Write "Description= ("& err.number &"),("& err.Description &")"
End If
'===============END FILES=====================
%>
|