Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Confused about Buffering and TableUpdate
Message
 
To
16/04/2001 19:32:38
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00495972
Message ID:
00496005
Views:
11
> 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
Previous
Reply
Map
View

Click here to load this message in the networking platform