I confirm that major databases JDBC drivers behave like MySQL's.
I think it's related to 
http://groups.google.com/group/sqlitejdbc/browse_thread/thread/7959d90e3c7392fa?hl=en

On May 7, 12:50 pm, MAILER-DAEMON <[EMAIL PROTECTED]> wrote:
> 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