Subject | Re: PreparedStatements |
---|---|
Author | Roman Rokytskyy |
Post date | 2004-04-06T14:37:09Z |
> ps.setDate(4, parseDate(val));Correct, it uses order from the statement.
>
> 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.
> So fields 1, 2 and 4 are varchars, field 3 is a date on the tableYes. Can you please provide a test case - Java class that creates
> defintion. So PS.setDate(4, date) is still correct in theory.
appropriate table, populates it, and reproduces an error?
Thanks!
Roman