General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
I've had this problem with buffered cursors, it was with SQL Server data but i guess tableupdate() is the same with VFP or Sql Server data.
Before the tableupdate() on the Payments table try to move the record pointer with a go top or skip or go bottom. and see if it fixes the problem.
>I have 3 tables that I need to update in a transaction. I have each table set with buffering. Payments = buffmode 3, PaymentDetails = buffmode 5, AccountsReceivable = buffmode 5. One table loses the updates when END TRANSACTION is issued.
>
>* here is a synopsis of the code that fails.
>BEGIN TRANSACTION
>SELECT Payments
>* There is a new inserted record in this table
>IF NOT TABLEUPDATE(.T.)
> ROLLBACK
> TABLEREVERT(.T.)
> RETURN
>ENDIF
>
>... DO STUFF
>SELECT PaymentDetails
>* There are new inserted records in this table
>IF NOT TABLEUPDATE(.T.)
> ROLLBACK
> TABLEREVERT(.T.)
> RETURN
>ENDIF
>
>... DO STUFF
>SELECT AccountsReceivable
>* There are updated records in this table
>IF NOT TABLEUPDATE(.T.)
> ROLLBACK
> TABLEREVERT(.T.)
> RETURN
>ENDIF
>
>* At this point, all tables have correctly been updated.
>END TRANSACTION
>* Now, the Payments table does not have the new record, but
>* the PaymentDetails and AccountsReceivable tables are correctly
>* saved.
>
>Any ideas here would be greatly appreciated.
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only