PLH
Well-known member
Hi guys,
I have searched three forums and didn’t find any similar problem to mine. That really surprised me because this should be very conmen problem with database apps. Now, I have a database connected to the app which was created by the wizard (in the design time). The problem is that if a user deletes the last record in a parent table of a relational database and terminates the app, the next time it runs the added new row’s recordID number will differ from the recordID (autonumber) in the database. I understand that dataset’s autonumber gets the database’s last autonumber when app starts but how can it get the next real autonumber. For example the last database autonumber is 6 and the next will be 8 because the last time app run the last record was deleted. Now the datasets gets 6 and when a new record is added the recordID in the datagrid will show 7. As you can see the chilledtable’s records will point to a different parenttable record. How can I fix this problem? Any suggestions are welcome!
I have searched three forums and didn’t find any similar problem to mine. That really surprised me because this should be very conmen problem with database apps. Now, I have a database connected to the app which was created by the wizard (in the design time). The problem is that if a user deletes the last record in a parent table of a relational database and terminates the app, the next time it runs the added new row’s recordID number will differ from the recordID (autonumber) in the database. I understand that dataset’s autonumber gets the database’s last autonumber when app starts but how can it get the next real autonumber. For example the last database autonumber is 6 and the next will be 8 because the last time app run the last record was deleted. Now the datasets gets 6 and when a new record is added the recordID in the datagrid will show 7. As you can see the chilledtable’s records will point to a different parenttable record. How can I fix this problem? Any suggestions are welcome!