Board index » delphi » Problems with CachedUpdates and Transaction Control

Problems with CachedUpdates and Transaction Control

I've found two problems with CachedUpdates when using transaction control.

1. I'm using Delphi 3.00 (not released) and BDE 4.51, and I'm acessing a
Oracle database (Oracle 7.x). In my app there are a cached Query. Before the
query's ApplyUpdates method be called a transaction control is started with
a database's StartTransaction method. After the ApplyUpdates, when some
error occurs, in except statement the RollBack method is triggered. The
CommitUpdates method is not called if some problem occurs. After RollBack,
the UpdateStatus property of every row cached is setted to 'unmodified' even
when these records are not commited yet. So, after Rollback, I tried to
change some of these uncommited records. If I call the cancel method and
start the modification again, I got a 'Record is already locked by this
session' error. I know, it's a complicated way to describe an error. In
other way:

New Record
Start Transaction
Apply Updates
Exception
RollBack
Edit the record
Cancel the edit
Edit again ->> ERROR

Debugging the DBTables I discovered that the DbiRelRecordLock called on
TBDEDataSet.InternalCancel returns a error code that is not handled.

2. Trying to solve this problem I got the upgrade of the new version of BDE
(5.0) and installed on my computer. OK! The problem number one was
eliminated!!! But now after the RollBack, when I try to call the
ApplyUpdates without change the records again, the OnUpdateRecord is not
called. I've read a message where there was a suggestion to change some line
on DBTables. Does it work with Delphi 3? How can I do it?

Thanks,

Zed.
Development Area.
TECNISA - Tecnologia em Informatica Ltda
Phone/Fax +55 31 271 7272

 

Re:Problems with CachedUpdates and Transaction Control


Am I correct in assuming that you are using a beta version of Delphi 3? We
cannot support this on the forums...

Juan

TECNISA Tecnologia em Informtica Ltda wrote in message
<6pav91$...@forums.borland.com>...

Quote
>I've found two problems with CachedUpdates when using transaction control.

>1. I'm using Delphi 3.00 (not released

Other Threads