• You should find out what is causing the error and handle it in the script rather than adding try catch for this purpose. Error may be from datatype mismatch or because of constraints. Check it and handle it in the script.

    https://sqlroadie.com/