You are right, my statement will bite you if you're using triggers.
However, it is not in any way a concurrency issue so you'll be fine if
you don't use triggers.
Thanks for the heads up,
Niels
-----Original Message-----
From: Abdullah Kauchali [mailto:abdullah.kauchali@isanusi.com]
Sent: donderdag 22 maart 2007 7:40
To: user-java@ibatis.apache.org
Subject: RE: SQL Server JDBC drivers
Avoid using @@Identity and instead use Scope_Identity().
Here is a blogg that summarises the point:
http://cf-bill.blogspot.com/2005/08/identity-scopeidentity-identcurrent.
html
Has links to MSDN for details.
Regards,
A
> -----Original Message-----
> From: Niels Beekman [mailto:n.beekman@wis.nl]
> Sent: Wednesday, March 21, 2007 10:19 PM
> To: user-java@ibatis.apache.org
> Subject: FW: SQL Server JDBC drivers
>
> And for the archives...
>
> -----Original Message-----
> From: Niels Beekman
> Sent: woensdag 21 maart 2007 20:33
> To: 'Mark Volkmann'
> Subject: RE: SQL Server JDBC drivers
>
> Sure:
>
> <insert id="Example_insert" parameterClass="Example">
> INSERT INTO example (example_column)
> VALUES (#exampleColumn#)
> <selectKey keyProperty="exampleId" resultClass="int">
> SELECT @@IDENTITY AS ID
> </selectKey>
> </insert>
>
> iBATIS will then populate the property "exampleId" with the value of
> the
> auto-incremented column.
>
> HTH,
>
> Niels
>
> -----Original Message-----
> From: Mark Volkmann [mailto:mark@ociweb.com]
> Sent: woensdag 21 maart 2007 20:28
> To: Niels Beekman; Graeme J Sweeney; Rose, Greg
> Cc: Dan Berghoff
> Subject: Re: SQL Server JDBC drivers
>
> Thanks to the three of you for replying!
>
> We're having trouble getting iBATIS to work with tables that have an
> integer primary key that is auto-incremented. If you have done that,
> can you send me the relevant snippet of XML from one of your {name}
> _SqlMap.xml files?
>
> Thanks!
>
> On Mar 21, 2007, at 11:36 AM, Niels Beekman wrote:
>
> > Hi,
> >
> > We use jTDS (http://jtds.sf.net) for several years now, it has
> > excellent
> > performance and any bugs (which are very rare) are dealt with
> > promptly.
> >
> > Niels
> >
> > -----Original Message-----
> > From: Mark Volkmann [mailto:mark@ociweb.com]
> > Sent: woensdag 21 maart 2007 17:28
> > To: user-java@ibatis.apache.org
> > Subject: SQL Server JDBC drivers
> >
> > If you have successfully used iBATIS with SQL Server, can you tell
me
> > what JDBC driver(s) have worked for you?
|