|
Java Platform 1.2 Beta 4 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.Throwable | +--java.lang.Exception | +--java.sql.SQLException | +--java.sql.SQLWarning | +--java.sql.DataTruncation
When JDBC unexpectedly truncates a data value, it reports a DataTruncation warning (on reads) or throws a DataTruncation exception (on writes).
The SQLstate for a DataTruncation is "01004".
Constructor Summary | |
DataTruncation(int index,
boolean parameter,
boolean read,
int dataSize,
int transferSize)
Create a DataTruncation object. |
Method Summary | |
int | getDataSize()
Get the number of bytes of data that should have been transferred. |
int | getIndex()
Get the index of the column or parameter that was truncated. |
boolean | getParameter()
Is this a truncated parameter value? |
boolean | getRead()
Was this a read truncation? |
int | getTransferSize()
Get the number of bytes of data actually transferred. |
Methods inherited from class java.sql.SQLWarning | |
getNextWarning , setNextWarning |
Methods inherited from class java.sql.SQLException | |
getErrorCode , getNextException , getSQLState , setNextException |
Methods inherited from class java.lang.Throwable | |
fillInStackTrace , getLocalizedMessage , getMessage , printStackTrace , printStackTrace , printStackTrace , toString |
Methods inherited from class java.lang.Object | |
clone , equals , finalize , getClass , hashCode , notify , notifyAll , wait , wait , wait |
Constructor Detail |
public DataTruncation(int index, boolean parameter, boolean read, int dataSize, int transferSize)
Create a DataTruncation object. The SQLState is initialized to 01004, the reason is set to "Data truncation" and the vendorCode is set to the SQLException default.
index
- The index of the parameter or column value
parameter
- true if a parameter value was truncated
read
- true if a read was truncated
dataSize
- the original size of the data
transferSize
- the size after truncationMethod Detail |
public int getIndex()
This may be -1 if the column or parameter index is unknown, in which case the "parameter" and "read" fields should be ignored.
public boolean getParameter()
public boolean getRead()
public int getDataSize()
public int getTransferSize()
|
Java Platform 1.2 Beta 4 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |