Argument value
|
Returns
|
RETURNED_SQLSTATE
|
The SQLSTATE returned by execution of the previous SQL statement
|
MESSAGE_TEXT
|
The condition indicated by RETURNED_SQLSTATE
|
CLASS_ORIGIN
|
Not currently used; always returned null
|
SUBCLASS_ORIGIN
|
Not currently used; always returned null
|
try
{ SQLIStatement insert_cust = new SQLIStatement ( "INSERT INTO customer VALUES (1,2) "); }catch (DhSQLException e) { errstate = e.getDiagnostics (DhSQLException.RETURNED_SQLSTATE) ; errmesg = e.getDiagnostics (DhSQLException.MESSAGE_TEXT) ; . . . } |
CREATE PROCEDURE sp1_02()
BEGIN // raising exception DhSQLException excep = new DhSQLException(777,new String("Entered the tst02 procedure")); if (true) throw excep; END |