Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Apply DiffGram
Message
General information
Forum:
Visual FoxPro
Category:
XML, XSD
Title:
Miscellaneous
Thread ID:
00949029
Message ID:
00949370
Views:
18
>Thanks, that helps..
>I tried using your second suggestion, using CursorAttach(). It all works as expected, except that it seems that the cursor adapter is sending each record update to sqlserver as a separate transaction.. For example, if I change three records at the front, create the diffgram, set the BuffermodeOveride=5 and the conflictchecktype = 3,set the updatecmd='' and then change the second record in sql server: when I attach the cursor and do a tableupdate(.T.,.F.) the result is that the first record gets updated but the second and third do not.
>I would have expected all three updates to be wrapped in a single transaction and they would all have succeeded or failed together.
>Do I explicitly need to start an sql transaction in this type of case?
>
>Ilmar

Hi Ilmar,

To send all modifications as a single transaction, switch connection to the manual commit mode, execute TABLEUPDATE() then commit or rollback the transaction and switch back to the auto commit mode. Something like this:
SQLSETPROP(...,"Transactions",2)
IF !TABLEUPDATE(...)
 SQLROLLBACK(...)
ELSE
 SQLCOMMIT(...)
ENDIF
SQLSETPROP(...,"Transactions",1)
Thanks,
Aleksey.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform