Subject Re: [ib-support] RefreshRecord bug
Author Helen Borrie
At 10:53 PM 13-03-02 +0000, Paul Hoove wrote:
>I receive the following message when attempting to
>call "RefreshRecord" on a client dataset:
>
> Unable to find record. No key specified

This is not a Delphi list. It is for Firebird and InterBase
questions. You'll need to take your questions about failing Delphi methods
to one of the b.p.d newsgroups.

But, just so that your post doesn't go completely unanswered:
The Delphi exception appears to indicate that you have no primary key in
the underlying table or, alternatively, the output dataset does not supply
unique rows. Dataset edits perform searched updates. A searched update
has to know what to search for.

>I can edit, save, and cancel. I can call "Refresh" on the dataset
>with no problem. The problem only occurs when I attempt to call
>the "RefreshRecord" method.

As above. Refresh closes and reopens the dataset. RefreshRecord needs to
have a successful CommitRetaining within a READ COMMITTED transaction; but
it looks as if the Commit(retaining) is failing because of missing keys.
>
>I am using Firebird 1.0 for both Linux and Windows. The problem
>always existed with the Windows Firebird, but the problem with the
>Linux Firebird started only after I downloaded the latest version
>last night. I did not receive the error message when using an older
>version of Firebird.

On this list, it's impossible to troubleshoot an SQL problem unless you
provide the exact statement that is failing. In Delphi, which does its own
(hidden) parsing of SQL, you will only get this by running an SQL monitor
over the API - then you can paste the SQL and post intelligent questions
that might have a chance of getting answered on this list.
>
>Is this a bug in Firebird

indefinable without the metadata and SQL info

>a bug in Delphi

Could be. Borland recently distributed a complete update pack for Delphi 6.

>or am I just missing something?

Highly likely, considering your test code appears to do nothing to try to
identify what is going on, e.g. Showmessage(MyQuery.Sql.Text) in your
BeforePost event would probably be quite revealing. Inspection of
variables in the debugger is always worth a shot.

regards,
Helen

All for Open and Open for All
Firebird Open SQL Database · http://firebirdsql.org ·
http://users.tpg.com.au/helebor/
_______________________________________________________