Results 1 to 2 of 2

Thread: ASP and MTS

  1. #1
    ranjani Guest

    Default ASP and MTS

    Hey! eureka!! A transaction handler in ASP just needs u to invoke the TRANSACTION command. Handle all ur errors meticulously :-( manually and on successful completion declare the transaction complete! Object context object is what i used to SetAbort and SetComplete...

  2. #2
    Join Date
    Dec 1969

    Default RE: ASP and MTS

    With ADO 2.5 and perhaps prior to that, you can use the following:<BR>Dim cnnDB<BR>Dim rsSomething<BR>Dim sSql<BR><BR>cnnDB*******= Server.CreateObject("ADODB.Connection")<BR>rsSomet hing = Server.CreateObject("ADODB.Recordset")<BR>sSql** ******= "Update MyTable Set MyColumn = &#039SomeValue&#039 Where MyPrimaryKeyColumn = &#039SomePKValue&#039"<BR><BR>cnnDB.BeginTrans<BR> cnnDB.Execute sSQL<BR>If cnnDB.Errors.Count &#062; 0 Then<BR>*For iErrCnt = 0 to cnnDB.Errors.Count - 1<BR>***sByRefMsg = cnnDB.Errors(iErrCnt).Description & "; "<BR>*Next<BR>*cnnDB.RollbackTrans<BR>*cnnDB.Er rors.Clear<BR>Else<BR>*cnnDB.CommitTrans<BR>End If<BR><BR>The display any errors with your "sByRefMsg" variable.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts