Roll back not working on linked-table in access???

From: TJ (TJ_at_discussions.microsoft.com)
Date: 03/18/05


Date: Fri, 18 Mar 2005 08:03:09 -0800

Hi,

Here is my brief code for transaction testing on linked-table.
I am using MS-ACCESS 2003
TargetTable is linked table, which from sharepiont list.

     Dim cnn1 As ADODB.Connection
     Set cnn1 = CurrentProject.Connection
     cnn1.BeginTrans

    Set rsTo = New ADODB.Recordset
    Set rsTo.ActiveConnection = cnn1
    rsTo.CursorLocation = adOpenKeyset
    rsTo.LockType = adLockOptimistic
    rsTo.Source = "TargetTable"
    rsTo.Open
   
     rsTo.AddNew
     rsTo![A] = "Test1"
     rsTo![B] = "Test2"
     rsTo.Update

    cnn1.RollbackTrans
   
    rsTo.Close
    Set rsTo = Nothing
    cnn1.Close
    Set cnn1 = Nothing
    
When I tested this code on local table, it worked. In other words, by
roll-back, new record wasn't added in the local table. However, when I tested
this code on the linked table, roll back didn't work. Though RollbackTrans
was executed, new record was still added.

How am I supposed to write for transaction code on linked-table?

Any suggesstion would be greately appreciated.

Thanks.

...................................................................TJ