"Record/Key Deleted" BDE Error

I had the same problem, with same conditions(interbase triggers and
generators) with default values for some fields, but the problem WENT
AWAY when I changed the property read only for key field to False and
required to false. I no longer get that error.

William Fisher <wfis...@wpo.borland.com> wrote:
>Andreas Troester wrote:
>I have seen many cases where the this happens.  It might be the same -
>(I am no database Guru - please bear with me)
>With server auto increment fields, the BDE posts the record, the server
>increments and it goes into the database just fine - THEN - before
>anything else happens the BDE reads the record it just posted and
>compares the two - and raises an exception if they don't match, or it
>can't find the record it posted or something similar.  And this is the
>case - the record as the BDE knew it, was not posted, the record with
>the new field was...
>So the error message is kind of bogus, and can be trapped and smothered.
>So if your data is showing up the DB, this is most likly what is

>> Jeff Ellis (jeff.el...@tekelec.com) wrote:
>> : Hello,

>> :       Maybe this is a simple question, but it has me stumped.  I am
>> : trying to use a TTable and add records to it programmatically.  The
>> : table is a local interbase table with a "before insert" trigger
>> : that generates a unique value for the key field ITEM_NUMBER.  The
>> : delphi code looks something like:

>> :       Table1.Append;
>> :       { Add data }
>> :       Table1.Post;

>> : If all fields are added to the table in the default manner, an
>> : exception occurs on the Post saying the ITEM_NUMBER (the key field)
>> : must have a value.  If I remove the TField for ITEM_NUMBER or
>> : change the "Required" property to False, I get an exception from
>> : the BDE sayint "Record/Key Deleted."  Can anyone explain this?  Is
>> : there a way around this to let Delphi know that the ITEM_NUMBER
>> : will be filled in by the server?

>> : Thanks in advance.

>> : --
>> : Jeff Ellis
>> : jeff.el...@tekelec.com

>> I remember having a problem like that. It disappeared after I removed all
>> DEFAULT directives from my SQL definition file. It seems that the insertion of
>> default values changes the record in a way that makes the DBE think it is a
>> different record (that of course is my own amateur interpretation).
>> I even mailed to Steve Koterski but somehow he was unable to reproduce the
>> proble so he could not really help me.
>> If somebody knows how to make use of default values in Interbase, please let
>> us know!

>> Hope this helps,

>>                                                    Andy