Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Update 2 or more CA cursors
Message
De
11/10/2010 22:07:28
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01484765
Message ID:
01484900
Vues:
26
Naomi,

Glad it was. =)

Dennis

>>Naomi,
>>
>>>I understand the pcinciple, but if you can post the code of your subclass, it will be most helpful.
>>
>>I am in a public computer now, but my codes goes something like this...
>>
>>In my DE subclass, I have the following methods: BeginTrans(), CommitTrans(), RollBackTrans(), SaveTrans().
>>
>>
>>BeginTrans()
>>= SQLEXEC( This.DataSource, "BEGIN TRANSACTION" )
>>
>>CommitTrans()
>>= SQLEXEC( This.DataSource, "COMMIT" )
>>
>>RollbackTrans()
>>= SQLEXEC( This.DataSource, "ROLLBACK" )
>>
>>SaveTrans()
>>* loop thru each CA object 
>>* dump into a Collection oCursors
>>
>>llCommit = .T.
>>
>>FOR EACH loCursor IN oCursors
>>   IF NOT loCursor.Save()
>>       llCommit = .F.
>>   ENDIF
>>ENDFOR
>>
>>IF llCommit
>>    This.CommitTrans()
>>ELSE
>>   This.RollBackTrans()
>>ENDIF
>>
>>
>>
>>HTH,
>>
>>Dennis
>>
>>
>>
>>
>
>Great, this is very helpful.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform