Quantcast
Channel: SCN : Discussion List - SAP SQL Anywhere
Viewing all articles
Browse latest Browse all 125

SQLErrText

$
0
0

Hello,

 

How does one go about getting the Sql Error Text associated with the SQLCODE in a SQLAnywhere 16 stored procedure. I can't seem to find a variable like the PowerBuilder SQLErrText that would hold this text. For example, for SQLCODE = -195, the message text is "Column '%1' in table '%2' cannot be NULL" How do I get the full message with the parameters filled in in a stored procedure?

 

For Example:

 

EXCEPTION

     WHEN OTHERS THEN

        SET ls_sqlcode = String(SQLCODE);

        ROLLBACK;

        CALL notfy_notification('H', 'I', 'ERROR','Error in Procedure SQLCODE: ' || ls_sqlcode, null);

        raiserror 18002 '18002 Error SQLCODE: ' || ls_sqlcode;

END;

 

Thanks


Viewing all articles
Browse latest Browse all 125

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>