[prev in list] [next in list] [prev in thread] [next in thread] 

List:       hsqldb-user
Subject:    [Hsqldb-user]  HSLQDB RC8 and getGeneratedKeys()
From:       John Eichelsdorfer <jeichels () yahoo ! com>
Date:       2010-03-05 17:01:16
Message-ID: 27796545.post () talk ! nabble ! com
[Download RAW message or body]


In trying to use stmt.getGeneratedKeys(), HSQLDB seems to always return back
"null".   The key is generated for the auto-increment column and the item is
inserted.   It does not fail or have exceptions, but does not seem to
generate any information.

We are using the following code:
            stmt =
                db.prepareStatement(sqlString, new String[] { pkColumnName
});
            insertPkHandler.setFields(stmt, dataObject);
            stmt.executeUpdate();
            rs = stmt.getGeneratedKeys();
            if (rs.next()) {
                result = rs.getBigDecimal(1);
            }

Any ideas?   We are trying to use HSQLDB with JPA2 for unit testing and this
feature seems to fail.  If this should not work are there any intentions on
making it work?

Thank you,

John

-----
John Eichelsdorfer

http://jobbank.com/ jobbank.com 
-- 
View this message in context: \
http://old.nabble.com/HSLQDB-RC8-and-getGeneratedKeys%28%29-tp27796545p27796545.html \
Sent from the HSQLDB - User mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Hsqldb-user mailing list
Hsqldb-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hsqldb-user


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic