ApplyUpdates and Reconciliation of errors
-
david_labbe
- Posts: 39
- Joined: Wed 01 Mar 2006 15:27
ApplyUpdates and Reconciliation of errors
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
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
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
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
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
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.
-
david_labbe
- Posts: 39
- Joined: Wed 01 Mar 2006 15:27
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
Ok, I now am a registered user of MyDAC Professional version... Can I have the patch?Antaeus wrote:If you are user of MyDAC Professional version, we can send you a source code patch to fix this problem.
________
BMW 1 SERIES
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
Which e-mail address did you use? I haven't received anything ... yet... (if it was a hotmail address, it always takes ages...)
________
FUCK
________
FUCK
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
Yes please... it seems that the mail was not deliveredAntaeus 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?
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.