Rollback not working in linked table???

T

TJ

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! = "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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top