SQLSTATE Values for Java External Procedures - Advanced SQL Engine - Teradata Database

SQL Data Definition Language Detailed Topics

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
June 2020
Language
English (United States)
Last Update
2021-01-24
dita:mapPath
jpx1556733107962.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1184
lifecycle
previous
Product Category
Teradata Vantage™

A Java external procedure can raise a java.lang.SQLException code with an exception number and message that are returned to the database and used to set the SQLSTATE and error message. Java exceptions thrown during the execution of a Java external procedure using SQL are often handled within Java. When this occurs, the exceptions do not affect SQL processing. Only those Java exceptions that are not handled within Java are seen in the SQL environment as SQL exception conditions.

When this occurs, the procedure returns an exception number and message to the Teradata Database which the system then uses to set the SQLSTATE value and error message that it returns to the requestor.

The range for valid SQLSTATE SQLException codes is 38U00 - 38U99, inclusive.

Some predefined error cases, such as non-valid JAR name, that have specific codes defined by the ANSI SQL standard, are also supported. The Teradata implementation of Java external procedures follows those definitions. For more information, see Teradata Vantage™ - SQL External Routine Programming , B035-1147 and Teradata Vantage™ - SQL Stored Procedures and Embedded SQL , B035-1148 .