| java.lang.Object java.lang.Throwable java.lang.Exception java.sql.SQLException java.sql.SQLWarning java.sql.DataTruncation
DataTruncation | public class DataTruncation extends SQLWarning implements Serializable(Code) | | An exception which is thrown when a JDBC driver unexpectedly truncates a data
value either when reading or when writing data.
The SQLState value for a DataTruncation is 01004 .
|
Constructor Summary | |
public | DataTruncation(int index, boolean parameter, boolean read, int dataSize, int transferSize) Creates a DataTruncation. |
Method Summary | |
public int | getDataSize() Gets the number of bytes of data that should have been read/written.
the number of bytes that should have been read or written. | public int | getIndex() Gets the index of the column or of the parameter that was truncated. | public boolean | getParameter() Gets whether the value truncated was a parameter value or a column value. | public boolean | getRead() | public int | getTransferSize() Gets the number of bytes of data that was actually read or written
the number of bytes actually read/written. |
DataTruncation | public DataTruncation(int index, boolean parameter, boolean read, int dataSize, int transferSize)(Code) | | Creates a DataTruncation. The Reason is set to "Data truncation", the
ErrorCode is set to the SQLException default value and other fields are
set to the values supplied on this method.
Parameters: index - the Index value of the column value or parameter that wastruncated Parameters: parameter - true if it was a Parameter value that was truncated, falseotherwise Parameters: read - true if the truncation occurred on a read operation, falseotherwise Parameters: dataSize - the original size of the truncated data Parameters: transferSize - the size of the data after truncation |
getDataSize | public int getDataSize()(Code) | | Gets the number of bytes of data that should have been read/written.
the number of bytes that should have been read or written. Thevalue may be set to -1 if the size is unknown. |
getIndex | public int getIndex()(Code) | | Gets the index of the column or of the parameter that was truncated.
the index number of the column or of the parameter. |
getParameter | public boolean getParameter()(Code) | | Gets whether the value truncated was a parameter value or a column value.
true if the value truncated was a Parameter value, false if itwas a column value |
getRead | public boolean getRead()(Code) | | Gets whether the value was truncated on a read operation or a write
operation
true if the value was truncated on a read operation, falseotherwise. |
getTransferSize | public int getTransferSize()(Code) | | Gets the number of bytes of data that was actually read or written
the number of bytes actually read/written. The value may be setto -1 if the size is unknown. |
|
|