<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <HTML> <HEAD> <META HTTP-EQUIV="Content-Type" Content="text/html; charset=Windows-1252"> <TITLE>@TRANSACTION</TITLE> <SCRIPT LANGUAGE="JavaScript"> <!-- TempString = navigator.appVersion if (navigator.appName == "Microsoft Internet Explorer"){ // Check to see if browser is Microsoft if (TempString.indexOf ("4.") >= 0){ // Check to see if it is IE 4 document.writeln('<link rel="stylesheet" type="text/css" href="/iishelp/common/coua.css">'); } else { document.writeln('<link rel="stylesheet" type="text/css" href="/iishelp/common/cocss.css">'); } } else if (navigator.appName == "Netscape") { // Check to see if browser is Netscape document.writeln('<link rel="stylesheet" type="text/css" href="/iishelp/common/coua.css">'); } else document.writeln('<link rel="stylesheet" type="text/css" href="/iishelp/common/cocss.css">'); //--> </script> <SCRIPT LANGUAGE="VBScript"> <!-- Sub Window_OnLoad() Dim frmContents On Error Resume Next If Not Parent Is Nothing Then Set frmContents = Parent.Contents If Not frmContents Is Nothing Then frmContents.Window.TOCSynch_Click End If End If End Sub //--></SCRIPT><META NAME="DESCRIPTION" CONTENT="Internet Information Services reference information"> <META HTTP-EQUIV="PICS-Label" CONTENT='(PICS-1.1 "<http://www.rsac.org/ratingsv01.html>" l comment "RSACi North America Server" by "inet@microsoft.com <mailto:inet@microsoft.com>" r (n 0 s 0 v 0 l 0))'> <META NAME="MS.LOCALE" CONTENT="EN-US"> <META NAME="MS-IT-LOC" Content="Internet Information Services"> </HEAD> <BODY BGCOLOR="#FFFFFF" TEXT="#000000"> <H2><A NAME="__transaction"></A><SUP></SUP>@TRANSACTION</H2> <P>You can use the @TRANSACTION directive to indicate that the script should be treated as a transaction. If a script is treated as a transaction, Component Services will create a transaction to coordinate the updating of resources.</P> <H6>Syntax</H6> <P><%@ TRANSACTION = <I>value</I> %></P> <P> </P> <H6>Parameters</H6> <DL> <DT><I>Value</I></DT> <DD>A string that indicates the type of transaction support. Possible values are: <TABLE border=0 cellpadding=5 cols=2 frame=box rules=all> <TR VALIGN="top"> <TD class=blue width=31%><B>Value</B></TD> <TD class=blue width=69%><B>Meaning</B></TD> </TR> <TR VALIGN="top"> <TD width=31%>Required</TD> <TD width=69%>The script will initiate a transaction</TD> </TR> <TR VALIGN="top"> <TD width=31%>Requires_New</TD> <TD width=69%>The script will initiate a transaction</TD> </TR> <TR VALIGN="top"> <TD width=31%>Supported</TD> <TD width=69%>The script will not initiate a transaction</TD> </TR> <TR VALIGN="top"> <TD width=31%>Not_Supported</TD> <TD width=69%>The script will not initiate a transaction</TD> </TR> </TABLE><BR> </DD> </DL> <H6>Remarks</H6> <P>If a script contains the @TRANSACTION directive, it must be the very first line in the .asp file, otherwise an error is generated. You must add the directive to each page that should be run under a transaction. The current transaction ends when the script finishes processing.</P> <P>If the script containing the @TRANSACTION directive has been called by either the <B>Server.Transfer</B> or <B>Server.Execute</B> method, and the value is specified as Required the script will continue the transaction of the calling asp if the calling asp was transacted. If the calling asp was not transacted, the called asp will create a new transaction.</P> <P>For example, the following two scripts would be considered one transaction.</P> <P>ASP</P> <PRE><CODE><%@ TRANSACTION=Required %> <% Server.Transfer("/asp/asp2.asp") %> ASP2 <%@ TRANSACTION=Required%> <% Server.CreateObject("Mytransactedcomponent.Closeout") %> </CODE></PRE> <H6>See Also</H6> <P><A HREF="/iishelp/iis/htm/asp/vbob554k.htm">ObjectContext</A></P> <hr class="iis" size="1"> <p align="center"><em><a href="../../../common/colegal.htm">© 1997-2001 Microsoft Corporation. All rights reserved.</a></em></p> </BODY> </HTML>