|Subject||Re: [Firebird-Java] SQL Query -> DataTruncation Exception|
> I would like to make a case for _not_ considering this a bug. I feelIn general I agree with your reasoning. However driver should not be
> that it is only logical that binding an oversized value to a
> fixed-size field should throw an exception, regardless whether or
> not the bind parameter is being used as an update value, a value
> comparison, or a filter parameter. There is no use (that I can think
> of) for binding an oversized parameter in a search filter;
responsible for such thing - all restrictions should apply in Firebird, and
driver should simply act as an adapter for the database API.
> thus I feel it is more reasonable to consider this to be a programmerYes, that is probably an issue of a lazy programmer that does not check the
> error than a bug in the driver.
size. However it works if you include the search pattern direct in SQL
(gives you empty result set), therefore it should be also possible to use
the same pattern with prepared statements.
I think we have to add this to FAQ.
> Finally, this behaviour (not accepting an oversized bind value for aFinally somebody has to take care about it in the Firebird. Hopefully this
> filter parameter) is consistent with the behaviour of both the
> kinterbasdb driver for Python, and the DBD::InterBase driver for Perl.
will happen automagically during merge with Vulcan.