Intercept OnReconcileError

Forum related to MySQL

Moderators: gto, cipto_kh, EgonHugeist

Post Reply
bonito
Fresh Boarder
Fresh Boarder
Posts: 1
Joined: 07.10.2009, 10:28

Intercept OnReconcileError

Post 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
Darkbow
Fresh Boarder
Fresh Boarder
Posts: 19
Joined: 01.09.2009, 12:28

Post 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.
Post Reply