Re: Fetching Identity

"Thomas Dudziak" <[email protected]>
Newsgroups gmane.comp.jakarta.ojb.user
Message-ID <[email protected]>
On 9/16/06, [email protected] <[email protected]> wrote:

> I am using MS Sql server 2000 as database server.
> Primary key of table is generated using Identity.
>        How can we get currently generated identity?

After saving an object, its field that is mapped to the primary key,
should contain the value.
If you're sure that only one thread accesses the database, then you
could also use Sql Server specific SQL to get the value (via JDBC):

http://www.sqlteam.com/item.asp?ItemID=319

Tom
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.