Progress
SQL-92
Guide and Reference


DhSQLException.getDiagnostics

Returns the requested detail about an exception.

Format

public String getDiagnostics(int diagType)

Returns

A string containing the information specified by the diagType parameter as shown in Table 6–1.

Parameters
diagType

One of the argument values listed in Table 6–1.

Table 6–1: Argument Values for DhSQLException.getDiagnostics 
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 returns null
SUBCLASS_ORIGIN
Not currently used. Always returns null

Throws

DhSQLException

EXAMPLE

This code fragment illustrates DhSQLException.getDiagnostics:

try
{
     SQLIStatement insert_cust = new SQLIStatement (
     "INSERT INTO customer VALUES (1,2) ");
}
catch (DhSQLException e)
{
     errstate = e.getDiagnostics (RETURNED_SQLSTATE) ;
     errmesg  = e.getDiagnostics (MESSAGE_TEXT) ;
         .
         .
         .
} 


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095