Re: Retrieving generated keys
- From: "Alin Sinpalean" <alin@xxxxxxxxxxxxx>
- Date: 14 Apr 2005 09:29:45 -0700
Jimbo wrote:
> If youre using SQL Server why not do the insert through a stored
> procedure?...this way you can use the Scope_Identity function to
return
> back the value of the newly inserted identity to Java..let me know if
> you need some sample code...
You can use scope_identity() without a stored procedure. Just execute
something like "INSERT ... SELECT scope_identity()". The problem is
that the JDBC code won't work across databases.
Alin.
.
- References:
- Retrieving generated keys
- From: garfield13
- Re: Retrieving generated keys
- From: Jimbo
- Retrieving generated keys
- Prev by Date: Re: Retrieving generated keys
- Next by Date: MSDE 2000 sp3a microsoft JDBC & W98
- Previous by thread: Re: Retrieving generated keys
- Next by thread: Microsoft JDBC Driver XA Problem
- Index(es):
Loading