johncassell
Well-known member
Hi There,
I need some help verifying data before saving it to my database table please..
I have a 'Customers' table and have dragged all the fields onto a windows form so it has come with the standard BindingNavigator bar across the top (With save, add, delete, next etc..)
CustomerCode is the primary key.
If for example I load customercode '1's data, and I change the value '1' to '2' then try to save, it comes up with 'value already exists in database' error.
If I put a check in to say 'if that value already exists then thrown a msgbox' then that would work in the above scenario but what If i loaded '1's data and then made changes to other fields, it would check to see if '1' is already in the table column and throw the msgbox even though I don't want it to in that case.
Hope that makes sense and someone can help with a way around this.
Thanks
John
I need some help verifying data before saving it to my database table please..
I have a 'Customers' table and have dragged all the fields onto a windows form so it has come with the standard BindingNavigator bar across the top (With save, add, delete, next etc..)
CustomerCode is the primary key.
If for example I load customercode '1's data, and I change the value '1' to '2' then try to save, it comes up with 'value already exists in database' error.
If I put a check in to say 'if that value already exists then thrown a msgbox' then that would work in the above scenario but what If i loaded '1's data and then made changes to other fields, it would check to see if '1' is already in the table column and throw the msgbox even though I don't want it to in that case.
Hope that makes sense and someone can help with a way around this.
Thanks
John