Posted by Tony Rogerson on 11/27/05 19:21
Hi,
Use SCOPE_IDENTITY() to get the last inserted IDENTITY value for that
statement...
insert blha......
select pkID = SCOPE_IDENTITY()
--
Tony Rogerson
SQL Server MVP
http://sqlserverfaq.com - free video tutorials
"BigJohnson" <craig.johnson@westleigh.co.uk> wrote in message
news:1132937707.195947.101060@g49g2000cwa.googlegroups.com...
> We're using ASPUpload as a tool to upload files to our server and save
> the details to SQLServer. However, I have an application where I need
> to return the pkID of the just saved file. I'm assuming that I could
> use the @@Identity command but cannot get this to function.
>
> Has anyone used this command with ASPUpload with an success, or any
> other methods that could be used?
>
> Thanks.
>
Navigation:
[Reply to this message]
|