RAD Studio for Microsoft .NET
|
You can modify your BDP applications to call the BDP Reconcile Error dialog to handle an update exception (as occurs sometimes when two people are trying to simultaneously update the same row of a database table).
private void bdpDataAdapter1_OnUpdateError(object sender, Borland.Data.Common.BdpUpdateErrorEventArgs e) { Borland.Data.Common.ReconcileErrorForm f = new Borland.Data.Provider.ReconcileErrorForm( e ); f.ShowDialog(); }
Your new Error Reconcile Form will display four columns in the upper portion of the window, and six radio buttons in the bottom portion of the window. The following table describes each of the columns.
Column Label |
Meaning |
Column Name |
The names of the columns of the table in which an error has occurred. |
Current Row |
The contents of the row that is currently in contention. |
Original Row |
What the row contained before the contentious data was entered. |
Server Row |
The last update that was saved to the Server. (This represents what the row contains on the server.) |
The three radio buttons on the lower left portion of the window allow you to indicate how to continue processing after handling the error. You can only choose one option from the following three choices.
Radio Button Label |
Meaning |
Retry update using primary key |
The error will be cleared, and then the update will be attempted again with the primary key. If the data row from the server cannot be found, this option will be disabled. |
Skip current row and continue |
Choose this option when you have decided not to attempt to update changes for the current row, but you want to try to update the rest of the rows. |
Abort updates |
The latest updates will not be applied, and error will be cleared, but no more updates will be attempted. |
The three radio buttons in the lower right portion of the window allow you to indicate which data to write to the database. You can only choose one option from the following three choices.
Radio Button Label |
Meaning |
Use original values |
Place the data from the Original Row column (described previously) into the row where the contention occurred. |
Use server values |
Place the data from the Server Row column, (described previously) into the row where the contention occurred. |
Use current values |
Place the data from the Current Row column, (described previously) into the row where the contention occurred. |
Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
|
What do you think about this topic? Send feedback!
|