java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for
JDBC][SQLServer]Str
ing or binary data would be truncated.
at
com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source
)
at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown
Source)
at
com.microsoft.jdbc.sqlserver.tds.TDSRequest.processErrorToken(Unknown
Source)
at
com.microsoft.jdbc.sqlserver.tds.TDSRequest.processReplyToken(Unknown
Source)
at
com.microsoft.jdbc.sqlserver.tds.TDSExecuteRequest.processReplyToken(
Unknown Source)
at
com.microsoft.jdbc.sqlserver.tds.TDSRequest.processReply(Unknown Sour
ce)
at
com.microsoft.jdbc.sqlserver.SQLServerImplStatement.getNextResultType
(Unknown Source)
at
com.microsoft.jdbc.base.BaseStatement.commonTransitionToState(Unknown
Source)
at
com.microsoft.jdbc.base.BaseStatement.postImplExecute(Unknown Source)
at com.microsoft.jdbc.base.BaseStatement.commonExecute(Unknown
Source)
at
com.microsoft.jdbc.base.BaseStatement.executeUpdateInternal(Unknown S
ource)
at com.microsoft.jdbc.base.BaseStatement.executeUpdate(Unknown
Source)
at SQLHelper.insertRecord(SQLHelper.java:24)
Any ideas? thanks!!
This exception is thrown when one of database table column cannot keep
the amount of data being inserted into it. For example your database
table has a colum named "TestColumn" of type "VARCHAR(10)". Now if you
will try to insert a string of length greater than 10, the program will
throw same exception...
Regards,
Yasir Khan