commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From William Speirs <>
Subject Re: [DbUtils] Returning the newly-generated primary key after an insert
Date Sun, 29 Jan 2012 16:05:14 GMT
That is a question more specific to the database you're using, than
DBUtils. For some databases this means writing a stored procedure which
performs the insert, and then a special select to get the primary key. You
can of course use DBUtils to call this stored proc and read the primary key.

Hope this helps...


On Sun, Jan 29, 2012 at 9:44 AM, Moandji Ezana <> wrote:

> Is it possible with the current API to do an insert and get back the
> generated primary key, rather than the number of affected rows?
> Best regards,
> Moandji

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message