Subject Firebird & Dataset behavior question
Author myles@techsol.org
I'm developing an application in Delphi 7, using FIBPlus, Firebird 1.5 Super
Server and DevExpress QuantumGrid 5.

I'm having some trouble understanding the behavior of datasets with Firebird
in one case, however. I have an application that obtains a list of rows
from a stored
procedure in Firebird. They list correctly in QG5. I click on a row,
and it opens a separate form for editing the detail of the record. In
order to get the correct record to display, I'm using the command:

DataModule1.pFIBDataSetCUST.Locate('R_CUST_ID', CurrentCust,[])

This works fine, and the correct record is loaded and displayed in the
form.

However when the user edits a field and then elects to save the record,
I issue a CommitRetaining to commit the changes to the database. This
works fine - the record is correctly updated.

But then I seem to lose my Dataset. I still have the rows available,
but immediately after the CommitRetaining my Current Record is set to
the first record in the dataset. In order to refresh the form and
reload the record that was edited, I do another:

DataModule1.pFIBDataSetCUST.Locate('R_CUST_ID', CurrentCust,[])

But it doesn't locate the record anymore. It continues to want to load
the first record of the dataset regardless.

What am I missing here?

Myles
============================
Myles Wakeham
Director of Engineering
Tech Solutions US, Inc.
Scottsdale, Arizona USA
Phone (480) 451-7440
www.techsol.org