Peter Haworth wrote:
> I'm a great believer in using CHECK constraints to do as much validation as
> possible within the database rather than code it in my application.
>
> However, I think I'm right in saying that as soon as a CHECK constraint
> fails, an error is returned to my application so no other CHECK constraints
> are executed  In a data entry type of application, this isn't ideal as
> users would prefer to see all the errors they need to correct in one
> message.

SQL constraints were designed to catch _programming_ errors, not _user_
errors.

> I can't think of a way round this but wondering if anyone has found a
> technique to return all CHECK constraint errors at once.

When you have interdependent constraints, such as "must be a closed
polygon" and "area must be at least 10", it might not make sense (or
even be impossible) to check all constraints.


Regards,
Clemens
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to