data aware grid and table - record/key deleted 
Author Message
 data aware grid and table - record/key deleted

I have a TDBGrid, TDataSource and TTable on a form. I created a Paradox
table with DataBase Desktop. The table has three fields. I set field[0], a
numeric field,  to be a key field that I want to set from calculated data.
The key field is not displayed in the grid - I am just using it to keep the
data sorted in the grid. The key field is used in a TChart however, but that
is working fine.

I am making the change in the BeforePost event handler. I have also tried
the LeaveColum and other event handlers and they all work the same with the
same problem. I have tried setting the field data with the SetFields method
and by accessing the fields directly; they both have the same problem.

Everything works fine when I insert a new  record, but when I edit an
existing record I get a Record/Key Deleted error message. If I click OK on
the error message box the data posts OK and all is good. I just need to get
rid of the annoying error message.

If I remove the "key" attribute from field[0] the error does not occur. But
then the data displayed in the grid is not sorted after post. Is there a
Sort method for tables? I cannot find it. If there is a Sort method I could
forget the key field and sort the table afterwards.

I cannot see what I am doing wrong here. Can anybody help?


Thu, 15 Apr 2004 07:17:09 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Help !!! Table.Append =>Record/Key deleted

2. Data base aware combo boxes cannot use querries to pick records

3. Grid display showing deleted records ?

4. Data-aware controls that be aware of nothing

5. I'm stuck and need advise - cannot fix Record/Key Deleted

6. Record/key delete Error???

7. 'Record/Key Deleted' Exception

8. record/key deleted error

9. EdbEngineError - Record/Key deleted

10. <Help> Record Key Deleted

11. Record/Key Deleted Problems w/Paradox

12. Record/Key deleted


Powered by phpBB® Forum Software