With
Transactions are logged within the "Transaction Statistics" section of MTS from the Microsoft Management Console.
MTS can only be used in Win NT Web Servers. It is not included with Personal web server for Win95.
To use
If
On the response page, you need to indicate that you are using MTS. Include the following line at the top of the page:
<%@ LANGUAGE="VBSCRIPT" TRANSACTION = Required %>
Throughout your script, you can apply error handling with "ObjectContext.SetAbort", to control the transaction. For example:
.... <% if upl.IsEmpty = 1 Then '---Abort upload if file is empty. ObjectContext.SetAbort %> ....
To display whether the transaction was committed or aborted, you can use the following subroutines:
<%
'--- Message appended to page if upload is a failure.
Sub OnTransactionAbort
Response.Write("<BR><hr><font color='red'><b>Transaction has been aborted.</b></font>")
End Sub%>
<%
'--- Message appended to page if upload is successful
Sub OnTransactionCommit
Response.Write("<BR><hr><font color='Green'><HR>Transaction has been committed.</b></font>")
End Sub
%>
See the samples provided as part of the distribution for examples of uploading one file as well as multiple files. For information about the samples provided, see Programmer's Samples.
| Previous Page | Next Page |