I have a big application consisting of:
1. 1 TOraSession OurDB in a datamodule FDM,
2. Lots of (read-only) master-child forms, where master query is named QDict and child Query is QDictDet, all linked to the same TOraSession.
The panels of these forms are regrouped into tabs into another form.
3. A form with an editable TDBGrid based on a TTable (linked to the TOraSession OurDB).
In some circonstances:
When closing form with editable TDBGrid, the following code is executed:
Code: Select all
void __fastcall TFSundays::FormClose(TObject *Sender, TCloseAction &Action)
{
if (!DBGrid1->ReadOnly) {
FDM->OurDB->ApplyUpdates();
FDM->OurDB->Commit();
}
Table1->Close();
Action=caFree;
}
cannot update, QDictDet is not owned by OurDB.
Problems:
* I have lots of queries named QDictDet, but I don't know which ones he is talking about.
* All forms are inherited from the same master-child where QDictDet is linked in TOraSession AND is ReadOnly.
* I really don't understand: the code asks to perform updates on queries linked to OurDB session. He claims he tries to update a query NOT related to this session. If it is NOT related to the session, he should not try to update. If it is related to the session, the error message should be something else that "query not linked to session".
How can I "debug" to see what is causing this problem? All QDictDet queries are read-only, the only one that is not is a TTable.
Regards,
Alain