Page 1 of 2

ApplyUpdates and Reconciliation of errors

Posted: Wed 19 Apr 2006 08:47
by david_labbe
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

Posted: Wed 19 Apr 2006 15:24
by david_labbe
Anybody?
________
Medical Marijuana

Posted: Thu 20 Apr 2006 06:26
by Antaeus
We have reproduced this problem. The investigation of it is in progress. As soon as we solve the problem we'll let you know.

Posted: Thu 20 Apr 2006 07:15
by david_labbe
Thanks! I'll also let you know if I come about a workaround...
________
Vaporizer Volcano

Posted: Thu 20 Apr 2006 08:54
by Antaeus
We have fixed this problem. This fix will be included in the next MyDAC build.

Posted: Thu 20 Apr 2006 09:10
by david_labbe
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

Posted: Thu 20 Apr 2006 09:40
by Antaeus
The new build of MyDAC will be available in about one month.

Posted: Thu 20 Apr 2006 09:48
by david_labbe
One month!!!

Could you provide me with a fix I could use until then?
________
Motorcycle tires

Posted: Thu 20 Apr 2006 11:38
by Antaeus
If you are user of MyDAC Professional version, we can send you a source code patch to fix this problem.

Posted: Thu 20 Apr 2006 16:00
by david_labbe
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

Posted: Fri 21 Apr 2006 15:25
by Antaeus
We have sent you the patch to fix this problem by e-mail.

Posted: Mon 24 Apr 2006 13:45
by david_labbe
Which e-mail address did you use? I haven't received anything ... yet... (if it was a hotmail address, it always takes ages...)
________
FUCK

Posted: Tue 25 Apr 2006 12:11
by Antaeus
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?

Posted: Tue 25 Apr 2006 13:11
by david_labbe
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

Posted: Tue 25 Apr 2006 13:48
by Antaeus
We have sent you the patch to fix this problem to labbe*ship*soton*ac*uk.