ApplyUpdates and Reconciliation of errors

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
david_labbe
Posts: 39
Joined: Wed 01 Mar 2006 15:27

ApplyUpdates and Reconciliation of errors

Post by david_labbe » Wed 19 Apr 2006 08:47

Hi there,

I am trying to implement an update reconciliation method. The idea is that if two clients access the same data at the same time, one edits the data and applies the update and the other one also edits the data and applies his updates, an OnReconcileError event is triggered pointing out to the second client that the data on the database is not consistent anymore with what he had initially.

Thus, supposing we have a simple "Customer" table with the following fields:
- Id (Integer)
- Name (VarChar 50)

and supposing we have the following components on the form:
- TMyConnection
- TMyTable
- TDataSetProvider (with the dataset set to the TMyTable component)
- TClientDataSet (with the provider set to the TDataSetProvider)
- TDataSource (with the dataset set to the TClientDataSet)

and that furthermore, the TMyTable field "Id" has the following ProviderFLags set to true:
- pfInUpdate, pfInWhere, pfInKey

and the TClientDataSet has an OnReconcileError event handling an OnReconcileError dialog (provided in the Borland sources),

and supposing now that 2 instances of the program are running at the same time, then applying the update on the first one and setting different values on the second one and applying the updates should raise the OnReconcileError dialog, pointing out to the 2nd user that the data has been modified on the database since he/she started editing.

All that works up to a certain point: It seems that the CurValue of the ClientDataSet is not returned thus rendering impossible the resolution of the conflict. I.e. the OnReconcileError dialog only shows the Modified Value and the Original Value but not the conflicting (i.e. current) value.

If one uses a different database, say the DBDEMOS provided by Borland with say an ADOConnection and an ADOQuery, it works fine.

Has anybody got any idea why it does not work with the MyDAC components? Has anyone managed such a procedure?

Any help to resolve that matter would be greatly appreciated.

Thanks

David
________
NEW JERSEY MARIJUANA DISPENSARY
Last edited by david_labbe on Fri 18 Feb 2011 15:33, edited 1 time in total.

david_labbe
Posts: 39
Joined: Wed 01 Mar 2006 15:27

Post by david_labbe » Wed 19 Apr 2006 15:24

Anybody?
________
Medical Marijuana
Last edited by david_labbe on Fri 18 Feb 2011 15:33, edited 1 time in total.

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Thu 20 Apr 2006 06:26

We have reproduced this problem. The investigation of it is in progress. As soon as we solve the problem we'll let you know.

david_labbe
Posts: 39
Joined: Wed 01 Mar 2006 15:27

Post by david_labbe » Thu 20 Apr 2006 07:15

Thanks! I'll also let you know if I come about a workaround...
________
Vaporizer Volcano
Last edited by david_labbe on Fri 18 Feb 2011 15:33, edited 1 time in total.

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Thu 20 Apr 2006 08:54

We have fixed this problem. This fix will be included in the next MyDAC build.

david_labbe
Posts: 39
Joined: Wed 01 Mar 2006 15:27

Post by david_labbe » Thu 20 Apr 2006 09:10

Could you tell me when this built will be available? It is quite important that I get hold of the fix asap. The whole project relies heavily on error reconciliation and my development schedule is very tight.

Thanks for looking into the issue and fixing it. Great support!

David
________
POT
Last edited by david_labbe on Fri 18 Feb 2011 15:33, edited 1 time in total.

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Thu 20 Apr 2006 09:40

The new build of MyDAC will be available in about one month.

david_labbe
Posts: 39
Joined: Wed 01 Mar 2006 15:27

Post by david_labbe » Thu 20 Apr 2006 09:48

One month!!!

Could you provide me with a fix I could use until then?
________
Motorcycle tires
Last edited by david_labbe on Fri 18 Feb 2011 15:33, edited 1 time in total.

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Thu 20 Apr 2006 11:38

If you are user of MyDAC Professional version, we can send you a source code patch to fix this problem.

david_labbe
Posts: 39
Joined: Wed 01 Mar 2006 15:27

Post by david_labbe » Thu 20 Apr 2006 16:00

Antaeus wrote:If you are user of MyDAC Professional version, we can send you a source code patch to fix this problem.
Ok, I now am a registered user of MyDAC Professional version... Can I have the patch?
________
BMW 1 SERIES
Last edited by david_labbe on Fri 18 Feb 2011 15:33, edited 1 time in total.

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Fri 21 Apr 2006 15:25

We have sent you the patch to fix this problem by e-mail.

david_labbe
Posts: 39
Joined: Wed 01 Mar 2006 15:27

Post by david_labbe » Mon 24 Apr 2006 13:45

Which e-mail address did you use? I haven't received anything ... yet... (if it was a hotmail address, it always takes ages...)
________
FUCK
Last edited by david_labbe on Fri 18 Feb 2011 15:33, edited 1 time in total.

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Tue 25 Apr 2006 12:11

We have sent you the patch to the following address: david_labbe*hotmail*com. Would you like us to send it to another e-mail address?

david_labbe
Posts: 39
Joined: Wed 01 Mar 2006 15:27

Post by david_labbe » Tue 25 Apr 2006 13:11

Antaeus wrote:We have sent you the patch to the following address: david_labbe*hotmail*com. Would you like us to send it to another e-mail address?
Yes please... it seems that the mail was not delivered

could you send it to [email protected]

Thanks

David
________
WEED VAPORIZERS
Last edited by david_labbe on Fri 18 Feb 2011 15:33, edited 1 time in total.

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Tue 25 Apr 2006 13:48

We have sent you the patch to fix this problem to labbe*ship*soton*ac*uk.

Post Reply