Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Confused about Buffering and TableUpdate
Message
 
À
16/04/2001 19:32:38
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00495972
Message ID:
00496005
Vues:
10
> I am using optimistic row buffering.
You may need to use table buffering. If you do so, then your commands to DELETE records will go outside the transaction. Once you have finished deleting records, then you'll start the transaction, issue the table update and then close the transaction.
SELECT table1
DELETE some records here

SELECT table2
DELETE more records here

BEGIN TRANSACTION

    SELECT table1
    lOk = TABLEUPDATE( 2, .T. )

    if lOk
        SELECT table2
        lOk = TABLEUPDATE( 2, .T. )
    endif

if lOk 
    END TRANSACTION
else
    ROLLBACK
endif
>The question is where do I put the TABLEUPDATE.
You should place it inside the transaction. Keep in mind that you may not need to put the DELETE commands inside the transaction, though.
Hector Correa
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform