Subject setting a Time type PreparedStatement parameter with setString
Author nagypapi
I am using setString on a PreparedStatement's Time type field, where
the String parameter is 10:20:00.0000

ex: insertTime.setString(1,"10:20:00.0000");

The interbase embedded sql guide in "Casting from SQL datatypes to
datetime datatypes" chapter says "Succeeds it the string is in
the following format: HH:MM:SS.thou"

So I thought this must work, but I get the following error:


java.lang.NumberFormatException: For input string: "00.0000"
at
java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
at java.lang.Integer.parseInt(Integer.java:456)
at java.lang.Integer.parseInt(Integer.java:497)
at java.sql.Time.valueOf(Time.java:87)
at
org.firebirdsql.jdbc.field.FBTimeField.setString(FBTimeField.java:74)
at
org.firebirdsql.jdbc.AbstractPreparedStatement.setString(AbstractPreparedStatement.java:383)
...

I don't use setTime, because sometime in the past, that caused a +-1
hour slip against my program

Thanks,
John