iBATIS MSSQL primary key

if you are using iBATIS and care about your newly created object primary key
just use the following code…
<insert ….>
<selectkey>
select @@IDENTITY as moduleId
</selectkey>
</insert>

Advertisements

One response to “iBATIS MSSQL primary key

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

my tweets

July 2006
S S M T W T F
« Jun   Aug »
1234567
891011121314
15161718192021
22232425262728
293031  

Flickr Photos

RSS my shared links on google reader

  • An error has occurred; the feed is probably down. Try again later.
%d bloggers like this: