Setup: Win7 64-bit running OE10.2B08
When a buffer passed to SAVE-ROW-CHANGES throws an error, is it possible to discern which buffer-field caused the error to be thrown?
We are testing concurrency error-handling, and it is possible the user would have changed 1 to n field values in the buffer-row passed to SAVE-ROW-CHANGES. We are being asked to provide the name of the field that caused the concurrency error (error code 11913) so that the UI can notify the user via a visual cue.
Hi,
As far as i know there is no possibility to see from the error which is the actual field that was changed. But I think you can make a loop through the fields (_field) of the database table on the row from database and see which one is different in the before-table of the data-set.
Does this make sense to you or you need more info on this solution ?
Flag this post as spam/abuse.
Hi,
As far as i know there is no possibility to see from the error which is the actual field that was changed. But I think you can make a loop through the fields (_field) of the database table on the row from database and see which one is different in the before-table of the data-set.
Does this make sense to you or you need more info on this solution ?
Gabriel, This makes sense, thank you for the feedback. I will need to do some testing to confirm the results and will post back here when I have more info to share.
Hi,
As far as i know there is no possibility to see from the error which is the actual field that was changed. But I think you can make a loop through the fields (_field) of the database table on the row from database and see which one is different in the before-table of the data-set.
Does this make sense to you or you need more info on this solution ?
Flag this post as spam/abuse.
Thanks Mike! I was aware I could loop through the buffer-fields, but wanted to make sure I checked that ABL did not already have a method that would return the info. I will mark your answer to close this thread.
Looping through the buffer fields and checking their values, does not always let you know which fields is causing the issue. I had that happen to me recently. Having the SAVE-ROW-CHANGES or the BUFFER-COMPARE return the differences, would help debugging and also letting the user know what the issue could be.
you have the before-buffer - going through it and comparing it to the current record should reveal which fields had changed.