|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.Throwable | +--java.lang.Exception | +--java.sql.SQLException | +--com.ibm.db.beans.DBException
DBException represents exceptions that are raised by classes in com.ibm.db.beans package.
Field Summary | |
---|---|
static int |
alreadyConnected
Error code if cannot connect to database because already connected. |
static int |
badPropertyValue
Error code if you attempt to set a property to an invalid value. |
static int |
badUidPwd
Error code if the username and password specified are not valid. |
static int |
cacheEmpty
Error code if the result set cache is empty. |
static int |
cannotConvert
Error code if a String value cannot be converted to an object of another class. |
static int |
cannotConvertToString
Error code if cannot convert a column value to a String. |
static int |
cannotRefreshData
Error code if cannot refresh data in a row because the row cannot be found in the database. |
static int |
cannotScrollBack
Error code if cannot refetch rows displaced from the cache. |
static int |
cannotSetAfterExecute
Error code if the property cannot be set after executing. |
static int |
columnAlreadyDefined
Error code if the column with the specified number has already been defined. |
static int |
columnNotDefined
Error code if the column with the specified number has not yet been defined. |
static int |
connectionClosed
Error code if the java.sql.Connection you pass to the setConnection method is not open. |
static int |
dbbaseDriverNotFound
Error code if the JDBC DriverManager is unable to find a driver. |
static int |
dbDuplicateColumn
Error code if the specified column is already defined. |
static int |
dbDuplicateParm
Error code if the specified paramenter is already defined. |
static int |
dbNotExecuted
Error code if the SQL statement has not been executed. |
static int |
decodeError
Error code if a password cannot be decoded. |
static int |
driverNotFound
Error code if the JDBC DriverManager is unable to find a driver. |
static int |
duplicateColumn
Error code if the column name was already used. |
static int |
duplicateParm
Error code if the parameter name was already used. |
static java.lang.String |
GENERIC_SQLSTATE
Generic SQLState used for all DBExceptions. |
static int |
inconsistentColumnCount
Error code if more columns were described than were actually returned. |
static int |
inconsistentColumnName
Error code if a column has a different name than was specified in its meta data description. |
static int |
indexTooLarge
Error code if the specified row index exceeds the allowable range. |
static int |
invalidColumnNumber
Error code if the specified column number is less than 1. |
static int |
invalidDeferralStyle
Error code if you attempt to set the updateDeferral property of a DBSelect to an invalid value. |
static int |
invalidDirection
Error code if the specified fetch direction is neither FETCH_FORWARD (1000) nor FETCH_REVERSE (1001). |
static int |
invalidParameterNumber
Error code if the specified parameter number is less than 1. |
static int |
invalidResourceLevel
Error code if an invalid resource level is specified. |
static int |
invalidResultNumber
Error code if the specified result number is less than 1. |
static int |
invalidRowNumber
Error code if the specified row number is less than 1. |
static int |
invalidScrollType
Error code if an invalid scroll type specified in the DBSelect.setScrollType() method. |
static int |
invalidSize
Error code if the specified value for a property representing size is a negative number. |
static int |
keyColumnMustBeSearchable
Error code if a column identified as part of a key has a datatype that is not searchable. |
static int |
lockNotSupported
Error code if method lockRow not supported for database product. |
static int |
malformedUrl
Error code if unable to create java.net.URL from String object. |
static int |
metaDataNotYetAvailable
Error code if meta-data information is not yet available. |
static int |
multipleTables
Error code if result set is from multiple tables and update, delete or insert was requested. |
static int |
mustApplyDeferredUpdates
Error code if you attempt to change the update deferral style of a DBSelect when there are already pending deferred updates. |
static int |
mustApplyRowValueChanges
Error code if you attempt to change the update deferral style of a DBSelect when value changes have been made in the current row, but not yet applied by performing updateRow() or moving to anther row. |
static int |
noActiveConnection
Error code if the connection is not active. |
static int |
noColumnUpdate
Error code if you attempt to set a value in a column which is not enabled for updates. |
static int |
noConnection
Error code if there is an internal error. |
static int |
noCurrentResult
Error code if operation is attempted that requires that you be positioned on a result set and you are not. |
static int |
noDeferralWithAutomaticLocking
Error code if you attempt to put automatic row locking and the deferral of updates into effect simultaneously. |
static int |
noDeferralWithLockedRow
Error code if you attempt an operation that will cause a row to be locked in the database while the deferral of updates is in effect. |
static int |
noInitialContext
Error code if cannot connect to the database because the InitialContext cannot be created. |
static int |
noLogWriter
Error code if trace is turned on and the LogWriter is null. |
static int |
noResults
Error code if the result set is empty. |
static int |
noResultSets
Error code if there are no result sets. |
static int |
noSearchableColumns
Error code if no searchable columns are in the result set. |
static int |
noSelectObject
Error code if no DBSelect is associated with a DBTableModel. |
static int |
noSQL
Error code if the command property of a DBStatement is null or the empty string when the statement is executed. |
static int |
noStatement
Error code if there is an internal error. |
static int |
noTableDefined
Error code if the bean cannot identify the correct table in order to lock, update, insert, or delete a row, or to re-fetch data from it. |
static int |
notCall
Error code if the SQL statement is not a CALL statement. |
static int |
notExecuted
Error code if the SQL statement has not been executed. |
static int |
notExecuting
Error code if execution of the SQL statement cannot be canceled because the statement is not executing. |
static int |
notOpen
Error code if the result set is not open. |
static int |
noTransactions
Error code if autoCommit false not supported for database product. |
static int |
notSelect
Error code if the SQL statement is not a SELECT statement. |
static int |
noValuesSet
Error code if cannot insert because no values were set. |
static int |
parameterAlreadyDefined
Error code if the parameter in the specified position has already been defined. |
static int |
parameterNotDefined
Error code if the parameter in the specified position has not yet been defined. |
static int |
readOnly
Error code if the result set is read only. |
static int |
resultNotDefined
Error code if the result in the specified position has not yet been defined. |
static int |
resultNotFound
Error code if more result sets were described than were actually returned. |
static int |
rowChanged
Error code if the current row cannot be updated or deleted because no matching row could be found in the database. |
static int |
rowFlaggedForDelete
Error code if deferred changes for a DBSelect include a delete of the current row, and you then attempt to set values in the row. |
static int |
rowNotFound
Error code if a lock cannot be obtained on the current row because no matching row could be found in the database. |
static int |
rowNotInDatabase
Error code if the specified row is not in the database. |
static int |
sqlException
Error code if an SQLException occurred. |
static int |
transactionIsolationError
Error code if can't set transaction isolation level. |
static int |
truncated
Error code if cannot perform operation because data truncation occurred when row was retrieved. |
static int |
unexpectedError
Error code if an unexpected error occurs. |
static int |
wrongObjectType
Error code if the value used to set a column or parameter is of a different Java class than specified in the meta data. |
Constructor Summary | |
---|---|
DBException()
DBException constructor comment. |
|
DBException(java.lang.String reason)
DBException constructor comment. |
|
DBException(java.lang.String reason,
java.lang.String sQLState)
DBDataException constructor comment. |
|
DBException(java.lang.String reason,
java.lang.String sQLState,
int errorCode)
DBDataException constructor comment. |
Method Summary | |
---|---|
int |
getErrorCode()
Returns the error code associated with the exception. |
Methods inherited from class java.sql.SQLException |
---|
getNextException, getSQLState, setNextException |
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 |
Field Detail |
public static final java.lang.String GENERIC_SQLSTATE
public static final int invalidRowNumber
public static final int columnAlreadyDefined
public static final int parameterAlreadyDefined
public static final int columnNotDefined
public static final int parameterNotDefined
public static final int resultNotDefined
public static final int duplicateColumn
public static final int duplicateParm
public static final int cannotSetAfterExecute
public static final int invalidResourceLevel
public static final int noSelectObject
public static final int malformedUrl
public static final int noCurrentResult
public static final int badPropertyValue
public static final int invalidResultNumber
public static final int invalidDirection
public static final int invalidSize
public static final int invalidColumnNumber
public static final int invalidParameterNumber
public static final int notExecuted
public static final int noColumnUpdate
DBSelectMetaData.setUpdateEnabled
method has been used to disable updates for the column whose value
you tried to set.
public static final int metaDataNotYetAvailable
public static final int decodeError
setPassword(String, boolean)
passing an encoded password and the value true>, but the
password cannot be decoded.
public static final int sqlException
getSQLException
to get the SQLException itself, and examine its contents.
public static final int badUidPwd
public static final int rowNotFound
public static final int noConnection
public static final int notOpen
public static final int connectionClosed
setConnection
method is not open. It is not possible to
use a Connection object which is closed.
public static final int dbNotExecuted
public static final int noResults
getCacheValueAt
method of DBSelect.
public static final int readOnly
deleteRow
) or would lead to changing the database later
(such as setColumn
).
public static final int rowNotInDatabase
lockRow
method
on a row you added to the result set via newRow
before you have inserted it into the database.
A row that is not in the database cannot be locked.
public static final int multipleTables
public static final int cannotConvert
setColumnFromString
or setParameterFromString
cannot be converted to an object of the
appropriate type for the column or parameter.
public static final int noActiveConnection
public static final int noStatement
public static final int dbDuplicateColumn
addColumn
method to add a column description to a StatementMetaData object,
but it already has a column with the specified name.
public static final int dbDuplicateParm
addParameter
method to add a parameter description to a StatementMetaData object,
but it already has a parameter with the specified name.
public static final int indexTooLarge
getCacheValueAt
or
setCacheValueAt
method of DBSelect.
public static final int driverNotFound
public static final int rowChanged
public static final int lockNotSupported
lockRow
not supported for database product.
The lockRow
method is not supported for Oracle, Microsoft SQL Server,
Sybase SQL Server, and databases which do not support positioned updates
and deletes (as reported in the JDBC DatabaseMetaData).
public static final int noTransactions
public static final int truncated
deleteRow
or setColumn
and a truncation warning was raised by the
database when the row was fetched. If data was truncated, it will not be
possible to find the correct row in the database to perform an update or delete.
public static final int notSelect
public static final int notCall
public static final int noResultSets
public static final int noValuesSet
updateRow
for a
row added to the result set via newRow
in which you have not yet set any values.
public static final int alreadyConnected
public static final int notExecuting
cancelAction
method to cancel a statement you are
executing via the execute
method or a statement you are
executing via the updateRow
or deleteRow
methods.
The cancelAction
method must be invoked from a thread other
than the one in which the statement is executing, while the statment is
executing.
public static final int noSearchableColumns
public static final int noTableDefined
public static final int transactionIsolationError
public static final int cannotConvertToString
validateLOBs
, the bean will try to
re-fetch any invalid Clobs or Blobs before reporting this error.
However, under some circumstances, the re-fetch may fail. For example,
it will fail if you are no longer connected to the database, or if
the value you are getting was originally set by you, not fetched
from the database via this result set.
public static final int cannotRefreshData
refreshRow
method
and the row cannot be found in the database.
It can also happen when you attempt to get a column value stored
in the cache as a Clob or Blob which has become invalid
(due to a commit occuring, for example), and you have
set the validateLOBs
option to cause an attempt
to refresh the value from the database, but the row cannot be found.
A variety of conditions may prevent a row from being found.
It could have been changed in the database independently of this
object after the row data was retrieved. Data for one or more columns
in the row could have been truncated or reformatted when retrieved
from the database, and therefore not match the database. For example,
decimal data is truncated when retrieved as an integer, timestamp data
is truncated when retrieved as a date, and a date stored as a string in
the database may be reformatted when retrieved as a date.
public static final int invalidDeferralStyle
public static final int mustApplyDeferredUpdates
public static final int noDeferralWithAutomaticLocking
public static final int noDeferralWithLockedRow
public static final int mustApplyRowValueChanges
public static final int rowFlaggedForDelete
public static final int cannotScrollBack
fetchMoreRows(FETCH_REVERSE)
method to fetch
rows before the first row currently in the cache.
In these cases, the exception occurs if
the resultset is not read-only, or if the underlying database
driver does not support scrollable cursors (a JDBC 2.0 feature).
public static final int cacheEmpty
public static final int resultNotFound
public static final int noSQL
public static final int invalidScrollType
public static final int inconsistentColumnCount
public static final int wrongObjectType
public static final int unexpectedError
public static final int noInitialContext
public static final int inconsistentColumnName
public static final int keyColumnMustBeSearchable
public static final int dbbaseDriverNotFound
public static final int noLogWriter
Constructor Detail |
public DBException()
public DBException(java.lang.String reason)
reason
- java.lang.Stringpublic DBException(java.lang.String reason, java.lang.String sQLState)
reason
- java.lang.StringsQLState
- java.lang.Stringpublic DBException(java.lang.String reason, java.lang.String sQLState, int errorCode)
reason
- java.lang.StringsQLState
- java.lang.StringMethod Detail |
public int getErrorCode()
getErrorCode
in class java.sql.SQLException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |