On 12/11/06, Patrick Marchwiak <[EMAIL PROTECTED]> wrote:
I am working on a Java program that uses SQLite for its database. I am using auto increment on some of my inserts and am wondering if there is some easy way to retrieve the auto incremented rowid right after inserting. I realize that there is a C++ function that does just that , but googling did not turn up much for Java. Thanks.
Are you using a JDBC driver, if so, which one? I am considering implementing Statement.getGeneratedKeys() using the C API sqlite3_last_insert_rowid() for the driver http://www.zentus.com/sqlitejdbc There may be some issues regarding concurrent connections that will introduce a race condition, but in the simple case it will return properly. d ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------