Subject Re: [Firebird-Java] SQL Query -> DataTruncation Exception
Author Roman Rokytskyy
> When pass in a parameter, the "?" of a length higher than 10, say "%
> searchphrase" the query fails with a data truncation exception from
> Jaybird.

JayBird cannot distinguish between params that are used in LIKE and those
used in assignment. However, when you pass long enough param in assignment,
it leads to server crash (bug in Firebird). At some point (and after
discussion in this group) it was decided to throw that exception when the
passed search string is bigger then the declared length of the field. This
happens only for parameters and has no influence if the search pattern is
included in the SQL statement.

Apparently it can be considered a bug for your case. Please fill a bug
report, so the issue is not lost.

The only solution for this issue is to fix the bug in Firebird, then we can
remove the limit in JayBird. At present the only workaround I can suggest is
to extend the size of the column to be big enough for all LIKE searches.