# JDBC Gateway: SQL Exceptions, properties do not exist

**URL:** <https://techcommunity.softwareag.com/t/jdbc-gateway-sql-exceptions-properties-do-not-exist/59844>\
**Category:** Forum\
**Tags:** Former-Crossvision-Products, Service-Orchestrator\
**Created:** [April 21, 2007, 3:58pm UTC](https://techcommunity.softwareag.com/t/jdbc-gateway-sql-exceptions-properties-do-not-exist/59844 "2007-04-21T15:58:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Louie](https://avatars.discourse-cdn.com/v4/letter/l/c68b51/32.png) [@Louie](https://techcommunity.softwareag.com/u/Louie)\
**Post date:** [April 21, 2007, 3:58pm UTC](https://techcommunity.softwareag.com/t/jdbc-gateway-sql-exceptions-properties-do-not-exist/59844/1 "2007-04-21T15:58:41Z")

</div>

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,

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [April 2, 2021, 2:40pm UTC](https://techcommunity.softwareag.com/t/jdbc-gateway-sql-exceptions-properties-do-not-exist/59844/2 "2021-04-02T14:40:06Z")

</div>


