Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Network:
Windows 2003 Server
Naomi,
Since the cursors resulting from CursorAdapters are not part of a DBC, I guess we cannot do transactions on the VFP side. =(
Thanks
Dennis
>>Naomi,
>>
>>In DataSession 1, I created a VFP Cursor from a Cursoradapter which gets its data from a MySQL table. I have set all there is to set to make it updatable. Its Buffermodeoverride is 5 - optimistic table buffering. I then made modifications to this cursor - edits, deletions and appends.
>>
>>In the MySQL client, I intentionally locked some records in the server side.
>>
>>Back to DataSession 1. I issue TABLEUPDATE(.T.), which obviously failed. So, I issued a TABLEREVERT(.T.). NOT ALL records were reverted back to its original state. Those that were 'successfully sent' to the server could not be reverted back.
>>
>>I have no problem with the server side as I have put SQL sends to commit and rollback in the AfterCursorUpdate event.
>>
>>What I want to happen is an "all or nothing" scenario - if any record update fails, then none gets updated - in the VFP side.
>>
>>The workaround I did was to just do a CursorRefresh() to fetch back the original records. Is this the ONLY way?
>>
>>Thanks!
>>
>>Dennis
>>
>>
>I see the problem, but I'm not sure of the answer since I only played with CA and local data. Can you use transactions in your scenario?
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement