db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dag.wan...@oracle.com (Dag H. Wanvik)
Subject Re: "Conglomerate could not be created"?
Date Tue, 19 Jun 2012 22:15:38 GMT
John English <john.foreign@gmail.com> 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");
ResultSet rs = ps.getGeneratedKeys();
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!

View raw message