John English <[email protected]> writes:

> dbInsert lines 1056/1057 look like this:
>   stat.executeUpdate();
>   ResultSet r = stat.getGeneratedKeys();
> so the failure happens when the prepared statement is executed, just
> before the call to getGeneratedKeys().

I tried this sample, but saw no problem:

Statement s = c.createStatement();
s.executeUpdate("create table t(c varchar(3))");
PreparedStatement ps = c.prepareStatement("insert into t values ?", 
Statement.RETURN_GENERATED_KEYS);
ps.setString(1, "foo");
ps.executeUpdate();
ResultSet rs = ps.getGeneratedKeys();
rs.next();
System.out.println(rs.getString(1)); // prints "null"

but then again, you see the error already on the execute.. Maybe you can
tweak you case into a small repro like this. Sorry I can't be of more
help. Good luck!

Reply via email to