You must Sign In to post a response.
  • Category: General

    MY SQL Error handling

    Hello All.

    I have project whose back end is in My SQL.
    I want to implement error handling in mysql.

    It should work like below,

    If any error occurred in regular store procedure, it should call error handling related store procedure and insert error in specific table.
    This Sp call only if error occurs.
    Please give sample error handling store procedure and regular search / insert store procedure which is calling error handling.

    Thanks.
  • #769520
    If you get an error in stored procedure, instead of an exit, you should continue without any error message. That means you can show any default or custom error code or message to the application/user. MySQL provides Handler to handle the exception in the stored procedure.
    Three type of Handler_Action:

    CONTINUE
    EXIT
    UNDO
    Type of Condition Value:

    mysql_error_code
    sqlstate_value
    SQLWarning
    SQLException
    NotFound

    https://www.besanttechnologies.com/dot-net-training-in-bangalore


  • Sign In to post your comments