Hi,
I've a master-detail relation through detail.MasterSource = master; (TmsQueries) both datasets have CachedUpdates=true; in the detail.AfterDelete-event the master is set in editmode; doing so the detail is requeried and all changes done on detail-records including the delete are missed. This happens only after upgrading to Sdac 4. Delphi7, SQL2k. Should you need a sample, please let me know.
best regards
Toni
Master - Detail in CacheUpdate
Again me,
still if the two datasets (master and detail) are not in cachedUpdates a requery of the detail is launched when setting the master in edit-mode. This could have the unwished effect that a modified detail-record is automatically posted to the database, could be with uncomplete data.
regard, toni
still if the two datasets (master and detail) are not in cachedUpdates a requery of the detail is launched when setting the master in edit-mode. This could have the unwished effect that a modified detail-record is automatically posted to the database, could be with uncomplete data.
regard, toni
Thank you for information.I've a master-detail relation through detail.MasterSource = master; (TmsQueries) both datasets have CachedUpdates=true; in the detail.AfterDelete-event the master is set in editmode; doing so the detail is requeried and all changes done on detail-records including the delete are missed. This happens only after upgrading to Sdac 4. Delphi7, SQL2k. Should you need a sample, please let me know.
We have reproduced the problem and fixed it.
This fix will be included in the next build of SDAC 4.
Please watch for announcements at the forum.
This is default behaviour. It is compatible with standard data access components such as BDE and ADO.still if the two datasets (master and detail) are not in cachedUpdates a requery of the detail is launched when setting the master in edit-mode. This could have the unwished effect that a modified detail-record is automatically posted to the database, could be with uncomplete data.
Your are right; this is the default behaviour. In SDac3.8 it wasn't. This and others also were the reason to use Sdac and not ADO or BDE. Excuse me if this sounds offending: only because ADO has a lot of bugs, SDAC mustn't have them.This is default behaviour. It is compatible with standard data access components such as BDE and ADO.
My program is build arround SDac3.8. It would be fine to have on Option if editing the master should requery the detail.
Perhaps, do you have any documentation of all this changed behaviours. I would like to avoid they are only discovered by my customers.
Do you have a release date for a new build? Is it possible to download your current source, still if it is in a beta-state? (I've registered the pro)
best regards, Toni
With SDAC 3.8 having a master - detail (detail.mastersource=master) launching a master.edit in the detail.beforeinsert- or detail.beforeedit-events did not requery the detail. I mean this behaviour. Now, with SDAC 4 the detail is requeried.
To reproduce: put a MsConnection, 2 MsQuery (master, detail), 2 datasource and 2 grids on a from; connect to Northwind, set master.sql.text='select * from customers', detail.sql.text='select * from orders where customerid=:customerid'; detail.mastersource=master; detail.beforeedit : master.edit; detail.beforeInsert: master.edit; connect datasources and grids; launch and try to change the data of the second detail-record; try to add a detail-record. You 'll see the effects.
best regards. Toni
To reproduce: put a MsConnection, 2 MsQuery (master, detail), 2 datasource and 2 grids on a from; connect to Northwind, set master.sql.text='select * from customers', detail.sql.text='select * from orders where customerid=:customerid'; detail.mastersource=master; detail.beforeedit : master.edit; detail.beforeInsert: master.edit; connect datasources and grids; launch and try to change the data of the second detail-record; try to add a detail-record. You 'll see the effects.
best regards. Toni
Thank you for information.With SDAC 3.8 having a master - detail (detail.mastersource=master) launching a master.edit in the detail.beforeinsert- or detail.beforeedit-events did not requery the detail. I mean this behaviour. Now, with SDAC 4 the detail is requeried.
To reproduce: put a MsConnection, 2 MsQuery (master, detail), 2 datasource and 2 grids on a from; connect to Northwind, set master.sql.text='select * from customers', detail.sql.text='select * from orders where customerid=:customerid'; detail.mastersource=master; detail.beforeedit : master.edit; detail.beforeInsert: master.edit; connect datasources and grids; launch and try to change the data of the second detail-record; try to add a detail-record. You 'll see the effects.
We have reproduced the problem and fixed it.
This fix will be included in the next build of SDAC 4.
Please watch for announcements at the forum.