Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2003
    Posts
    2

    Unanswered: How to send error back?

    How can I send SQL exception message and code from Stored Procedure back to calling program
    thanks
    Last edited by ngutta; 07-23-03 at 13:19.

  2. #2
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1

    Re: How to send error back?

    Originally posted by ngutta
    How can I send SQL exception message and code from Stored Procedure back to calling program
    thanks
    Surprisingly, it really depends on the language of the calling program. For example, in Java you would call SQLException.getErrorCode() and SQLException.getMessage(). In C I imagine you could read SQLCA structure.

    You may want to RTF DB2 Application Development Guide for details.

    Hope this helps.

    Nick
    ---
    "It does not work" is not a valid problem statement.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •