Results 1 to 3 of 3

Thread: Transaction Processing

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2002
    Location
    Montreal
    Posts
    9

    Transaction Processing

    Hi Everyone,

    I just need some information about Transactions in VB 6.0, so here we go.

    Sub Test1()

    Dim connA as ADODB.Connection
    Set connA = New ADODB.Connection

    connA.BeginTrans

    ....
    Code Here
    .....

    Call Test2

    'If no problems then Commit
    connA.CommiTrans

    ' If problems then Rollback
    connA.RollbackTrans


    End Sub


    Sub Test2()

    Dim connB as ADODB.Connection
    Set connB = New ADODB.Connection

    .......
    rs.Open str, connB, adOpenKeyset, adLockOptimistic, adCmdText
    .......

    End Sub


    What if an error occurs and i rollback my transaction for connA, does what ever i did with connB still get processed since it falls in between the BeginTrans and the RollBackTrans or do i have to specifically use the same connection?

    Any help would much help!!!

  2. #2

  3. #3
    Member
    Join Date
    May 2003
    Posts
    32
    You have to use the same connection. What happens in Connection A has nothing to do with Connection B (and vica versa).

Posting Permissions

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



Click Here to Expand Forum to Full Width