commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bagyinszki P├ęter <peti...@dpg.hu>
Subject Re: Retrieving Auto Generated Keys
Date Mon, 31 May 2004 10:11:12 GMT
> > 
> > P.s. I see one problem. getGeneratedKeys() method is part of JDBC 3.0. 
> > Perhaps, it may be issue.
> 
> That's exactly why DbUtils doesn't support it yet.  I'd be interested in
> any solutions you come up with.
> 
> David

I've done this for my project by subclassing the original QueryRunner. There are insert methods
in this new class, these are similar to query and update. The insert methods return ResultSet
containing the generated keys.

I think it would be a good solution to include a similar class in the package (JDBC3.0 ->
QueryRunner3 ?). If you don't want to use JDBC 3.0, you could still use the original QueryRunner.

petike
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message