Subject | DataTruncation in PreparedStatement.setString |
---|---|
Author | Leonid Kandyba |
Post date | 2005-05-13T14:51:58Z |
Hi,
DataTruncation error accures if PreparedStatement.setString(int,String)
is called with a string value longer than the corresponding field in the
database.
It's may be okey by insert or update statements, but
in my case I tried to execute a sql-statement like 'select ... from... where
str_field like ?'
It's a bug?
Is there any workarond to avoid this problem?
cu,
Leonid Kandyba
DataTruncation error accures if PreparedStatement.setString(int,String)
is called with a string value longer than the corresponding field in the
database.
It's may be okey by insert or update statements, but
in my case I tried to execute a sql-statement like 'select ... from... where
str_field like ?'
It's a bug?
Is there any workarond to avoid this problem?
cu,
Leonid Kandyba