home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 1998 February
/
CHIP_2_98.iso
/
software
/
pelne
/
optionp
/
iis4_07.cab
/
SetAbort_JScript.asp
< prev
next >
Wrap
Text File
|
1997-10-25
|
2KB
|
63 lines
<%@ TRANSACTION=Required LANGUAGE="JScript" %>
<HTML>
<HEAD>
<TITLE>Forced Abort with a Transactional Web Page</TITLE>
</HEAD>
<BODY BGCOLOR="White" topmargin="10" leftmargin="10">
<!-- Display Header -->
<font size="4" face="Arial, Helvetica">
<b>Forced Abort with a Transactional Web Page</b></font><br>
<hr size="1" color="#000000">
<!-- Brief Description blurb. -->
This is an example demonstrating a forced abort
within a Transacted Web Page. When an abort occurs,
all transacted changes within this web page (Database Access,
MSMQ Message Transmission, etc.) will be rolled back to
their previous state -- guarenteeing data integrity.
<%
// Abort Transaction
ObjectContext.SetAbort();
%>
</BODY>
</HTML>
<%
// The Transacted Script Commit Handler. This function
// will be called if the transacted script commits.
// Note that in the example above, there is no way for the
// script not to abort.
function OnTransactionCommit()
{
Response.Write ("<p><b>The Transaction just comitted</b>.");
Response.Write ("This message came from the ");
Response.Write ("OnTransactionCommit() event handler.");
}
// The Transacted Script Abort Handler. This function
// will be called if the transacted script aborts
// Note that in the example above, there is no way for the
// script not to abort.
function OnTransactionAbort()
{
Response.Write ("<p><b>The Transaction just aborted</b>.");
Response.Write ("This message came from the ");
Response.Write ("OnTransactionAbort() event handler.");
}
%>