Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

tableupdate() in transaction

Status
Not open for further replies.

JimPowers

Programmer
Jul 1, 2003
4
US
Have a batch posting program that adds records to a number of tables. Tables to be updated are using optimistic table buffering with multilocks set on. When all records have been added, changes are committed with tableupdate(.T.,.F.) inside a transaction. If any tableupdate() return .F., execute a ROLLBACK and a tablerevert() on all tables, otherwise go to END TRANSACTION. I've run into a situation where one of the tables does not contain the new records at the end of the transaction, but all of the others do. In debug, I verified that tableupdate() returned .T. for all of the tables. This code has been in use for a long time with no problems. Any ideas of what set of circumstances could be causing it to break now?
 
Have you rebuilt the indexes on the table in question?

PF
 
Are you sure that table actually got updated in the first place?

If you do a tableupdate on a table that had not had its data changed it, I believe it will still return .t.
 
Yes, the records were added. Stepping through in debug, I saw where the APPEND BLANK's and REPLACE's were executed. Also, the RECCOUNT() of the table increased by 1 each time a record was added, then went back to its original value at END TRANSACTION.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top