Page 1 of 1

Intercept OnReconcileError

Posted: 07.10.2009, 11:17
by bonito
Hi all,
I have on my form the following components:
ClientDataset1, DatasetProvider1, Zquery1, ZConnection1 and they are so linked:
ZQuery1.Connection := ZConnection1;
ClientDataset.ProviderName := DatasetProvider1;
DatasetProvider1.Dataset := ZQuery1;
ZConnection is connected to MySql 4.1.

In reading mode of the ClientDataset everything is ok, I can insert, edit, and post records, when I call the ClientDataset.ApplyUpdates to write my changes on the database, everythings is ok too.
But when more threads simultaneously, edit and post the same records on the ClientDataset, the last thread who calls the method ClientDataset.ApplyUpdates should get the event ClientDataset.OnReconcileError. But this doesn't appen! Why? Can anybody help me?
If I replace Zeos components with DbExpress components this event is raised, why?

P.S. I have delphi 7

Posted: 08.10.2009, 12:15
by Darkbow
Could you please ellaborate a bit on your architecture? I am not sure I understood it.

Do all threads access the same TClientDataset? If yes, is it protected somehow?

If not, the problem could lay in the fact that TClientDatasets are not thread-safe.

Regarding dbExpress, as far as I know some of its drivers are thread-safe per se, so that could be the reason for it to work.