• Check constraints will validate that data in a table follows certain rules.

    Error handling will prevent errors from crashing a process by giving the option of following an alternate path if there's an error.

    Both concepts are completely different things.

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2