Mimer JDBC/MIDP 2.12

com.mimer.jdbc
Class SQLException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--com.mimer.jdbc.SQLException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
BatchUpdateException, SQLWarning

public class SQLException
extends java.lang.Exception

An exception that provides information on a database access error or other errors.

Each SQLException provides several kinds of information:

Below are the errors returned by the Mimer JDBC driver itself. For errors returned by the driver but originating from the server, see the Mimer SQL Programmers Reference. % is a placeholder for dynamically generated text clarifying the error.

Vendor codeSQL StateDescriptive text
-22000HYC00java.sql.SQLException: Optional feature (%) not implemented
-2200122023java.sql.SQLException: Argument not allowed in %
-22002HY000java.sql.SQLException: Can not execute a statement with parameter markers. Use PreparedStatement or CallableStatement
-22003HY000java.sql.SQLException: The statement contains a query. Use executeQuery() or execute()
-22004HY000java.sql.SQLException: The statement is not a query. Use executeUpdate() or execute()
-220062200Gjava.sql.SQLException: Type mismatch
-2200708006java.sql.SQLException: Server returned bad handshake message
-2200808004java.sql.SQLException: This Mimer JDBC driver (%) requires at least 8.2 servers, which the database % on host % using port % is not, %
-2200908001java.sql.SQLException: Redirection message specified unknown protocol: %
-2201008001java.sql.SQLException: Connection failed, too many redirections
-2201108004java.sql.SQLException: VAR code necessary for login
-2201308S01java.sql.SQLException: Could not send data to server, %
-2201408S01java.sql.SQLException: Could not receive data from server, %
-2201508006java.sql.SQLException: The connection with the server was lost
-2201608001java.sql.SQLException: Illegal port: %, %
-2201708001java.sql.SQLException: Could not establish connection to server % on host % using port %, %
-2201808001java.sql.SQLException: Could not create streams to server on host % using port %, %
-2201908001java.sql.SQLException: Error when doing handshake with database % on host % using port %, %
-2202008001java.sql.SQLException: Error when reading redirection message from database %, host %, port %, %
-2202122018java.sql.SQLException: Invalid character value for cast
-2202208004java.sql.SQLException: Beta period expired %, current timestamp is %. The server does not have a beta license.
-2202307009java.sql.SQLException: Illegal column index: %. Valid is 1 to %
-2202407009java.sql.SQLException: Illegal parameter index: %. Valid is 1 to %
-220250A000java.sql.SQLException: Server returned unknown datatype: %
-2202607009java.sql.SQLException: Column '%' is not in the ResultSet
-2202923000java.sql.SQLException: The parameter is not nullable
-2203024000java.sql.SQLException: The ResultSet is not positioned on a row
-2203107002java.sql.SQLException: No value was set for parameter number
-22032HY024java.sql.SQLException: Cannot specify negative Max Field Size
-22033HY024java.sql.SQLException: Cannot specify negative Max Rows
-22034HY024java.sql.SQLException: Cannot specify negative Timeout
-22035HY010java.sql.SQLException: Statement is closed
-22036HY000java.sql.SQLException: Server returned illegal isolation code: %
-22037HY096java.sql.SQLException: Illegal isolation level: %
-2203822018java.sql.SQLException: Could not convert the string '%' to a numeric value
-2203922001java.sql.SQLException: String data, right truncation when converting '%' to numeric with precision % and scale %
-2204001S07java.sql.SQLException: Fractional truncation
-22041HY009java.sql.SQLException: Invalid use of null pointer
-2204208003java.sql.SQLException: Connection is closed
-22043HY010java.sql.SQLException: PreparedStatement is closed
-22044HY010java.sql.SQLException: ResultSet is closed
-2204522007java.sql.SQLException: Invalid datetime format
-22046HY000java.sql.SQLException: An internal error occured in %
-2204722003java.sql.SQLException: Numeric value out of range
-2204822001java.sql.SQLException: String data, right truncation
-2204922015java.sql.SQLException: Interval field overflow
-2205034000java.sql.SQLException: Invalid cursor name (%)
-2205107002java.sql.SQLException: Parameter number %, which is output, was not registered.
-22052HY000java.sql.SQLException: Could not convert Unicode character to ISO8859-1
-22053HY000java.sql.SQLException: Statement type not recognized, STY %
-22054HY000java.sql.SQLException: % statements currently not supported via this JDBC driver
-22055HY008java.sql.SQLException: Request cancelled
-22056HY000java.sql.SQLException: Could not set socket timeout, %
-22057HY109java.sql.SQLException: Method % is not allowed on forward only cursors.
-22058HY000java.sql.SQLException: Could not connect within % seconds
-22059HY000java.sql.SQLException: Invalid result set type, %
-22060HY000java.sql.SQLException: Invalid concurrency, %
-2206122008java.sql.SQLException: Datetime field overflow
-22062HY010java.sql.SQLException: No statements added to batch
-22063HY000java.sql.SQLException: The driver does not support TYPE_SCROLL_SENSITIVE result sets. A TYPE_SCROLL_INSENSITIVE result set was returned
-22064HY010java.sql.SQLException: No parameters were batched
-22065HY010java.sql.SQLException: Must call addBatch() before executing the batch
-22066HY010java.sql.SQLException: Use executeBatch() to execute with batched parameters
-22067HY000java.sql.SQLException: Only INSERT, UPDATE and DELETE statements are allowed in batches.
-22068HY000java.sql.SQLException: Only procedure calls which invoke non-result procedures are allowed in CallableStatement batches.
-22069HY000java.sql.SQLException: Only input parameters are allowed.
-22070HY010java.sql.SQLException: The statement has not been executed
-22071HY010java.sql.SQLException: The result set belongs to a program ident which is not active.
-22072HY107java.sql.SQLException: Invalid absolute row number (0).
-2207308003java.sql.SQLException: PooledConnection is closed
-2207408003java.sql.SQLException: This object does not support the method %
-220750A000java.sql.SQLException: % is not supported by % servers and earlier
-22076HY010java.sql.SQLException: Stream is closed
-22077HY010java.sql.SQLException: IOException on InputStream (%)
-22078HYC00java.sql.SQLException: % not supported on % version
-2207908004java.sql.SQLException: This Mimer JDBC driver (%) is too old for the database % on host % using port %, %
-22080HY000java.sql.SQLException: Server returned %(%) - too large for this driver
-22081HY024java.sql.SQLException: Tried to set fetch direction to %, which is illegal
-22082HYC00java.sql.SQLException: The registered data type (%) was not supported
-22083HY024java.sql.SQLException: Illegal result set type (%)
-22084HY024java.sql.SQLException: Illegal result set concurrency (%)
-22085HY024java.sql.SQLException: Negative fetch size specified
-22086HY024java.sql.SQLException: Fetch size can not be larger than maxRows (%)
-2208725000java.sql.SQLException: % object became invalid after transaction ended
-22088HY010java.sql.SQLException: % is closed
-2208922001java.sql.SQLException: CharacterStream was shorter (% characters) than specified (% characters)

See Also:
Serialized Form

Constructor Summary
SQLException()
          Constructs an SQLException object; reason defaults to null, SQLState defaults to null, and vendorCode defaults to 0.
SQLException(java.lang.String reason)
          Constructs an SQLException object with a reason; SQLState defaults to null, and vendorCode defaults to 0.
SQLException(java.lang.String reason, java.lang.String SQLState)
          Constructs an SQLException object with a reason and SQLState; vendorCode defaults to 0.
SQLException(java.lang.String reason, java.lang.String SQLState, int vendorCode)
          Constructs a fully-specified SQLException object.
 
Method Summary
 int getErrorCode()
          Retrieves the vendor-specific exception code for this SQLException object.
 SQLException getNextException()
          Retrieves the exception chained to this SQLException object.
 java.lang.String getSQLState()
          Retrieves the SQLState for this SQLException object.
 void setNextException(SQLException ex)
          Adds an SQLException object to the end of the chain.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SQLException

public SQLException()
Constructs an SQLException object; reason defaults to null, SQLState defaults to null, and vendorCode defaults to 0.


SQLException

public SQLException(java.lang.String reason)
Constructs an SQLException object with a reason; SQLState defaults to null, and vendorCode defaults to 0.

Parameters:
reason - a description of the exception

SQLException

public SQLException(java.lang.String reason,
                    java.lang.String SQLState)
Constructs an SQLException object with a reason and SQLState; vendorCode defaults to 0.

Parameters:
reason - a description of the exception
SQLState - an XOPEN code identifying the exception

SQLException

public SQLException(java.lang.String reason,
                    java.lang.String SQLState,
                    int vendorCode)
Constructs a fully-specified SQLException object.

Parameters:
reason - a description of the exception
SQLState - an XOPEN code identifying the exception
vendorCode - a database vendor-specific exception code
Method Detail

getErrorCode

public int getErrorCode()
Retrieves the vendor-specific exception code for this SQLException object.

Returns:
the vendor's error code

getNextException

public SQLException getNextException()
Retrieves the exception chained to this SQLException object.

Returns:
the next SQLException object in the chain; null if there are none

getSQLState

public java.lang.String getSQLState()
Retrieves the SQLState for this SQLException object.

Returns:
the SQLState value

setNextException

public void setNextException(SQLException ex)
Adds an SQLException object to the end of the chain.

Parameters:
ex - the new exception that will be added to the end of the SQLException chain

Mimer JDBC/MIDP 2.12

Submit a comment or suggestion Version 2.12 of Mimer JDBC for the CLDC/MID Profile Specification
Copyright Upright Database Technology AB, Box 1713, SE-751 47 UPPSALA, Sweden. All Rights Reserved.