Subject | Re: [Firebird-Java] DataTruncation in PreparedStatement.setString |
---|---|
Author | Roman Rokytskyy |
Post date | 2005-05-13T15:08:47Z |
> DataTruncation error accures if PreparedStatement.setString(int,String)A bug, but not in driver. If you pass longer string in parameter, you will
> 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?
crash the server. So far this bug is not fixed in Firebird, so it was
decided that it is better to throw DataTruncation.
> Is there any workarond to avoid this problem?I do not know about any.
Roman