Subject Re: Data types and conversion cost/benefit
Author Roman Rokytskyy

> For me I rarely use the PreparedStatement.set*();

If you do not use prepared statements, you are almost on the safe
side. The only thing you should care, is to use escaped syntax for
your date/time/timestamp values.

> Could you explain or provide an example of something that might
> cause trouble. I have not run into any problems so far, but that
> does not mean I am not sitting on a time bomb.

In case of passing a timestamp in DateFormat.FULL format formatted
using German locale but having English locale as default, I'm pretty
sure driver will fail to parse that string and convert it to date.
Actually yesterday I failed to parse "Saturday, February 17, 1917,
20:30:31" (I was trying to fix deprecation warning in the test).

> Of course outside of the obvious, like inserting a funky date as a
> string into a date field. I know if I do pass Firebird a date string
> that it can recognize then it will handle the conversion. If it
> pass a funky one Firebird will puke.

Date, time and timestamp are the obvious ones. Another issue can be
in parsing "20,00" instead of "20.00" into double columns. There can
be some other issues...

This applies mostly to prepared statements, but also to your
technique. Frankly speaking I do not understand why do you use plain
statements and force server compile them again and again. But anyway,
this technique is legal.

Best regards,