|
<<SNIP>>
For the archive the required syntax is:
Exec SQL
GET DIAGNOSTICS EXCEPTION 1
:errorText = DB2_ORDINAL_TOKEN_1;
Exec SQL
GET DIAGNOSTICS EXCEPTION 1
:errorText = DB2_ORDINAL_TOKEN_2;
This can be continued for as many tokens as are present/required. As
Chuck pointed out earlier you can determine how many there are to
retrieve by looking at the message details for the SQL message that
appears in the log for a specific error condition. In the case of
SQL validation there are only 2.
_1 is the error position in the XML text and _2 is the detailed
message describing the specific validation error.
That was all a lot harder than it should have been!
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.