You are here: Re: Return pkID of last saved record - ASPUpload & @@Identity « MsSQL Server « IT news, forums, messages
Re: Return pkID of last saved record - ASPUpload & @@Identity

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация