My situation is this. I am currently using Delphi XE and building a simple database app.
The situation involves Instructors and notes for the instructors. So far I have a TIBDataSet for the tblInstructors, and a TIBDataSet for the tblNotes, both with appropriate SQL statements for the insert, delete, etc.
The problem arises when inserting a new Instructor. It will update file (with standard tblInstructors.insert, tblInstructors.post) and having an frmSplash.db_transaction.CommitRetaining;
after the post is called. It appears to update fine (by refreshing the table in a separate application for viewing interbase databases, after the post is called). However right after the insert when trying to add a note, it will throw an error (attached in screenshot).
HOWEVER, if I close the application after the instructor has being inserted, then load it again and select the instructor that was inserted, then insert a note, it will work fine.
before the tblnotes are posted, I've put a tblnotesIN_ID.value := tblInstructorsIN_ID.value;
to link them, since not havign that will just insert the note without any reference to the instructor. So maybe someone can hint to me the best way to do this, regarading master/detail with TIBDataSet. :)
I hope I have made sense with this, please if anyone has any questions ask away!