empire-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jens Breitenstein <mailingl...@j-b-s.de>
Subject retrieve id of auto-inc field after insert
Date Wed, 07 Dec 2011 14:18:36 GMT
hi all!

I need to retrieve the auto-inc key after an insert. I found a class 
called DBDatabaseDriver.DBSetGenKeys which seems to be perfect, but 
unfortunately this is only accessible via DBDatabase. As the comment 
states it's not recommended to use this method but DBCommand. 
Unfortunately DBCommand does not support beans (as far as I saw from the 
source) so I tried DBRecord which does not support DBSetGenKeys. So I am 
running in circles I guess.

Is there an easy solution to create a DBCommand using values from a 
bean? Or to retrieve the auto-inc value from the inserted DBRecord?


Thanks in advance

Jens


Mime
View raw message