I am putting together an editor for an application I am creating.
The data ultimately resides on a SQL server.
The application loads some of the data from the server into a dataset, which is used by a bindingsource which is then used by a bindingnavigator. (wow that's a mouthful).
The issue is, the dataset contains some constraints, one of them involves a "code" that must be unique, similar to an account number for any company, they can't repeat but are more useful to end users than the identity data.
Anyway, if I have 2 records, and the code for one record is A and is B for the other...if I change B to A, I get a constraint exception. Great! That's what's supposed to happen, except that there are other text box controls on the form that are bound too dataset fields that have a unique constraint...is there any way at all of finding out what form control contains the invalid data?
Also, to throw another wrench in the gears, the form contains 2 total bindingsources, both of which are bound to tables that have unique constraints.
I have looked everywhere I can think of and I can't find anything on handling these errors correctly other than a message box that just shows the standard e.Message error (which is useless if you ask me).