Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to kown commit all database use tableupdate() buffer
Message
De
15/03/2000 03:35:40
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00345668
Message ID:
00345724
Vues:
24
Hi Samuel.

>> I open three dbf files( buffering 5, one for order header, one for details and one for misc charges) in a input form. I have a problem, I DON'T know it is OK or NOT commit successful when user click SAVE buttor(I use tableupdate() function). please help, tell me which method make sure COMMIT all files. <<

Is this what you are looking for?
LOCAL llOk
BEGIN TRANSACTION
llOk = TABLEUPDATE( 1, .F., 'TxLogHdr' )
*** IF Header is OK
IF llOk
    llOk = TABLEUPDATE( 1, .F., 'TxLogTbl')
    *** If Table is OK
    IF llOk
        *** Try for details        
        llOk = TABLEUPDATE( 1, .F., 'TxLogDet' )
    ENDIF
ENDIF 
*** What happened?
IF llOk
    END TRANSACTION
ELSE
    ROLLBACK
ENDIF
*** Return the appropriate result
RETURN llOk
Marcia
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform