Mega Code Archive

 
Categories / Delphi / ADO Database
 

Displaying a list of constraint error messages

Question: How can I show a list of constraint error messages to the user on the client, correct the errors and re-post at one time? Answer: You can only ever have one failed constraint at a time. For example, if you have 3 record level constraints and they are all going to fail when you post, then you will get an exception when you post that corresponds to the first constraint that failed. From there, you can't get the second constraint that failed until you fix the problem with the first one and attempt to re-post.