We help IT Professionals succeed at work.

Delphi 4 & Database Error

RalphPorter
RalphPorter asked
on
Hi Folks,

To paint the picture, I have a simple scenario, a form with an order header/detail scenario - connected to an access database via ODBC (TTable Object & Data source). The user clicks a button and the code writes an order header record, The user can then select a product and the code writes an order detail record.

Now here's the problem if the order detail table is entirely empty when I start the program and then call the insert method of the order detail Ttable object I get an exception "Record/Key Deleted".

If I manually place a record in the table before starting the program then all is well.

It's odd that even if I then delete all the order line records using the same program and insert a new one it works Ok.

It only fails if the order line table is completely empty when I start the program. Does anyone have any ideas for me please I would really appreciate it. Thank you very much.

Regards,

Ralph.  
Comment
Watch Question

Software Developer
BRONZE EXPERT
Commented:
I read a problem like that and I think it's a bug, try to update the BDE
http://www.borland.com/devsupport/bde/

Author

Commented:
Sorry mnasman, had forgotten I'd asked this one. Thank you for your help.

Best Regards

Ralph.

Explore More ContentExplore courses, solutions, and other research materials related to this topic.