Subject | Re: PreparedStatements |
---|---|
Author | Nick Sydenham |
Post date | 2004-04-06T15:33:08Z |
--- In Firebird-Java@yahoogroups.com, "Roman Rokytskyy"
<rrokytskyy@a...> wrote:
that I've got 102 input parameters (noddy DB so design is limited
:-)). I'll investigate further.
<rrokytskyy@a...> wrote:
> > ps.setDate(4, parseDate(val));A test case works fine. It might have something to do with the fact
> >
> > where parseDate returns a java.sql.Date with the hours, minutes,
> > seconds and milliseconds set to 0.
> >
> > I am assuming that with a PS of 'insert into table (f1, f2, f4, f3)
> > values (?, ?, ?, ?)' that the types are read in the order specified by
> > the SQL and not the order in which they are specified on the table.
>
> Correct, it uses order from the statement.
>
> > So fields 1, 2 and 4 are varchars, field 3 is a date on the table
> > defintion. So PS.setDate(4, date) is still correct in theory.
>
> Yes. Can you please provide a test case - Java class that creates
> appropriate table, populates it, and reproduces an error?
>
> Thanks!
> Roman
that I've got 102 input parameters (noddy DB so design is limited
:-)). I'll investigate further.