TQuery, record locked error when using Transaction control
Posted on 2000-05-02
I was making a dialog containing several linked cached queries...and I tried to use transaction-control to enable the user to cancel all updates, or to commit. Everything seemed well until I tried to modify records more then once, then I got the message "Record lock failed".
I've now broken the problem down to one query and an UpdateSql, where I fire the UpdateSQL.Apply(ukModify) in the query's OnAfterPost. The second time the record is modified the same error occurs. If I remove the StartTransaction the error does not occur; however I've found no reason why it shouldn't be possible to use the transaction and rollback this way. The problem persists also when the query is closed and opened after each modification.
I'm using D4P, BDE 5.01 and Paradox tables.