Subject RE: [firebird-support] Who's guilty?---
Author Johannes Pretorius
If you don't mind I can communicate with you via private mail as this is
not DB related and we might annoy people
on the list, but here is some info on the CommitUpdates

In a summary if you clear the Cache and then commit and your commit fails,
you cannot try again as it is gone
but for more detailed help look at the following :

In the Delphi Help it says as follows:

//================ SNIP START ================
Call CommitUpdates to clear the cached updates buffer after both a
successful call to ApplyUpdates and a database component's Commit method.
Clearing the cache after applying updates ensures that the cache is empty
except for records that could not be processed and were skipped by the
OnUpdateRecord or OnUpdateError event handlers. An application can attempt
to modify the records still in the cache.

Record modifications made after a call to CommitUpdates repopulate the
cached update buffer and require a subsequent call to ApplyUpdates to move
them to the database.

Note: Applications that use a database component's ApplyUpdates method to
apply and commit pending updates for all datasets associated with the
database component do not need to call CommitUpdates.
//============== SNIP END ===============

And if you look at the ApplyUpdates procedure of the TDatabase Component it
is as follows :

//================ SNIP START =============
procedure TDatabase.ApplyUpdates(const DataSets: array of TDBDataSet);
I: Integer;
DS: TDBDataSet;
for I := 0 to High(DataSets) do
DS := DataSets[I];
if DS.Database <> Self then
DatabaseError(Format(SUpdateWrongDB, [DS.Name, Name]));
for I := 0 to High(DataSets) do
//============== SNIP END ======================

Now I believe the Borland developers know there components a lot better
than us, thus following there standard
almost insures a application to work as it is expected.

Hope it helps


At 10:12 03/12/2003 +0000, you wrote:

>Could calling Tquery.Commitupdates before calling a Tdatabase.Commit
>cause any issues, cause other than the fact the bde driver flags is null
>my code does as suggested.
>Martin Dew
>Senior Developer
>Adastra Software Ltd.
>Unit 4, Eurogate Business Park, Ashford, Kent TN24 8SB
>Tel: (01233) 722700 Fax: (01233) 722701


Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (
Version: 6.0.545 / Virus Database: 339 - Release Date: 27/11/2003

[Non-text portions of this message have been removed]