View Single Post

   
  #4 (permalink)  
Old 02-29-2008, 06:31 AM
Steve
 
Posts: n/a
Default Re: Identity In SQL VS Autonumber In Access

SCOPE_IDENTITY is not supported by SQL Server 7 (once again I am sorry I
forgot to mention which version of
SQL Server I am using) do you have any other suggestions ?

Steve

"David Portas" <REMOVE_BEFORE_REPLYING_dportas@acm.org> wrote in message
news:1110275881.484473.10290@z14g2000cwz.googlegro ups.com...
> Normally you use SCOPE_IDENTITY to return the IDENTITY value after the
> INSERT. Could you explain why you want the IDENTITY value before
> insertion? How do you intend to use the returned value? There are some
> strategies you could use, such as generating a value first and then
> INSERTing it. If you want to use an IDENTITY column though I'm not sure
> what benefit you would gain by knowing the value beforehand.
>
> Serializing INSERTs isn't recommended because that approach doesn't
> scale well. It shouldn't be necessary with an IDENTITY column anyway.
>
> --
> David Portas
> SQL Server MVP
> --
>



Reply With Quote