I'm using Delphi 5 + an Ms-Access97 database.
In the database there are several tables.
Every table has a unique key (KeyField) of type AUTONUMBER.
Between Table1 and Table2 there is a one-to-many relation.
KeyField 1 --| KeyField
DataField1 |-- ... DataField1
I my application I use TTable-components.
This is what I have to do :
1) Insert a record in Table1 (unique key = autonumber-field)
2) Insert a record in Table2 (unique key = autonumber-field)
Before the Insertion in Table2 I have to fill in the value
of the KeyField (autonumber) of Table1
I have the following problem :
1) Works Fine;
2) when I'm trying to retrieve the value of the autonumber-field of Table1
I get the value '0', so I can't insert a record in Table2.
Is there a way to solve my problem ?
The Mayor ;-)