How to save to multiple tables with master detail link.
That is, how to save the master table first then the detail tabes.
For example, there is a order table and a orderItem table.
When save button is clicked. It must save to Order table first then to
orderItem table.
dataModule11.getQueryOrder().post();
dataModule11.getQueryOrderItem().post();
DataSet[] tosave = {dataModule11.getOrder(), dataModule11.getQueryOrderItem()};
dataModule11.getAILEDatabase().saveChanges(tosave);
But it gives error message saying a record does not exsist in Order Table.
That is, how to save the master table first then the detail tabes.
For example, there is a order table and a orderItem table.
When save button is clicked. It must save to Order table first then to
orderItem table.
dataModule11.getQueryOrder().post();
dataModule11.getQueryOrderItem().post();
DataSet[] tosave = {dataModule11.getOrder(), dataModule11.getQueryOrderItem()};
dataModule11.getAILEDatabase().saveChanges(tosave);
But it gives error message saying a record does not exsist in Order Table.