I've added this as a test case and it will be fixed in the next
version. Thank you for the neatly contained example.

d.

2008/5/7 MAILER-DAEMON <[EMAIL PROTECTED]>:
>
>  I get unexpected behaviour, possibly a bug, of the PreparedStatement
>  when using it in a loop and modifying single values, but not all, in
>  each iteration. The unmodified values are lost. Example:
>
>  PreparedStatement prep = conn.prepareStatement("SELECT ?,?");
>  prep.setInt(1, 4);
>
>  for (int i = 1; i < 3; i++) {
>     prep.setInt(2, i);
>     ResultSet rs = prep.executeQuery();
>     while (rs.next()) {
>         System.out.println(rs.getInt(1) + " " + rs.getInt(2));
>     }
>  }
>
>  Output:
>  4 1
>  0 2
>
>  Expected result (and what MySQL does) is:
>  4 1
>  4 2
>
>  >
>

--~--~---------~--~----~------------~-------~--~----~
Mailing List: http://groups.google.com/group/sqlitejdbc?hl=en
To unsubscribe, send email to [EMAIL PROTECTED]
-~----------~----~----~----~------~----~------~--~---

Reply via email to