Error when using BeginTrans

Results 1 to 4 of 4

Thread: Error when using BeginTrans

  1. #1
    Tudor Holton Guest

    Default Error when using BeginTrans

    Is this the correct way to use BeginTrans & CommitTrans?<BR><BR>When I run it I get an error:<BR>error &#039 80020009&#039 <BR>Exception occurred. <BR>/transaction.asp, line 6<BR><BR>Here&#039s the code:<BR>&#060;%<BR> function transact(accountfrom,accountto,amount)<BR> Set rsfrom = objConn.execute("SELECT MAX(id) FROM "&accountfrom)<BR> Set rsto = objConn.execute("SELECT MAX(id) FROM "&accountto)<BR> objConn.BeginTrans<BR> objConn.execute("INSERT INTO "&accountfrom&" (id,link,amount) " _<BR> &"VALUES ("&rsfrom(0)&",&#039"&accountto&"&#039,"&(-amount)&")")<BR> objConn.execute("INSERT INTO "&accountto&" (id,link,amount) " _<BR> &"VALUES ("&rsfrom(0)&",&#039"&accountfrom&"&#039,"&amount& ")")<BR> objConn.CommitTrans<BR> end function<BR>%&#062;<BR><BR>Cheers,<BR>Tudor.<BR>

  2. #2
    Tudor Holton Guest

    Default Can no-one help me with this?

    I find this rather hard to believe! :-)<BR><BR>Cheers,<BR>Tudor.

  3. #3
    Join Date
    Dec 1969

    Default RE: Error when using BeginTrans

    It&#039s one way of using it, yes. Try putting all the .execute calls inside. if theat doesn&#039t work, try re-installing MTS<BR><BR>j

  4. #4
    Tudor Holton Guest

    Default Why MTS?

    According to my reference (, the BeginTrans and CommitTrans methods are part of the ADO. Why would I be concerned with MTS? Doesn&#039t IIS implement a correct version of ADO?<BR><BR>Cheers,<BR>Tudor.

Posting Permissions

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