Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Transactions across sessions
I have long wondered why VFP seems unable to have a transaction across private datasessions. Does anyone know why and whether there is a way to get around this?
The situation might be something like this:
You have two separate business objects (bus1 and bus2) which perform separate tasks. They each have their own private data session. They each perform a business process and write data. Sometimes they are operate independently and sometimes they both need to occur as part of a larger process.
oBus1.Run() - perform business logic and write to buffered tables in its own private datasession
oBus1.Commit() - begin transaction, table update and end transaction
When each process operates independently everything is fine. However if
I now want the following it won't work as required because the begin transaction can't operate across the affected datasessions.
oBus1.Run()
oBus2.Run()
Begin Transaction
oBus1.Commit()
oBus2.Commit()
End Transaction
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