Louie
(Louie)
April 21, 2007, 3:58pm
1
Hi,
I forced my sequence to INSERT INTO a non-existing table via a SagJDBCStatement with xbd.jdbc.error.continue = yes to return the control to the sequence and process the exception checking routines.
This is the SQL JDBC component:
This is the SQL template:
INSERT INTO library.BIS04CP (SXADDT, SXADTM, SXRCPD, SXRSTA) VALUES (?,?,?,?)
Cntl Record Add Date
NUMERIC
2
SXADDT
Cntl Record Add Time
NUMERIC
2
SXADTM
Record Period
CHAR
1
SXRCPD
Cntl Record Status
CHAR
1
SXRSTA
myConnection
JDBCConnectionTemplate.xml
TYPE_FORWARD_ONLY
CONCUR_READ_ONLY
My problem is, after the INSERT ran, there were no properties set for any of:
xbd.jdbc.message
xbd.jdbc.code
xbd.jdbc.SQLState
According to the cSO documentation,
SQL Exceptions and Warnings
The JDBC API will throw a SQLException when an error occurs for a connection or for a SQL statement. SQLWarnings are a subclass of SQLException that deal with database access warnings. SQL warnings don’t cause applications to stop. The most common type of warning is a data truncation warning. The JDBC Components catch SQLExceptions and SQLWarnings and create the following three properties which contain the exception’s message, SQLState, and code.
Property Value
xbd.jdbc.message
Contains the SQL message text. This property exists only when a SQL Exception or Warning occurs.
xbd.jdbc.code
Contains the SQL Code. This is a number that is the JDBC driver vendor’s error code number. This property exists only when a SQL Exception or warning occurs.
xbd.jdbc.SQLState
Contains the SQLState. A string identifying the error according to the X/Open SQLState conventions. This property exists only when a SQL Exception or warning occurs.
Please let me know if I miss something in sequence.
Thanks,