Results 1 to 2 of 2

Thread: akhil@ilinksys.com

  1. #1
    Akhil Agrawal Guest

    Default akhil@ilinksys.com

    &nbsp;<BR>I&#039m inserting a record to a SQL database using ASP, and need to get the autonumber generated for that record. Any ideas on how to retrieve it? Thanks.

  2. #2
    Join Date
    Dec 1969

    Default RE: useful subject

    "SET NOCOUNT ON;INSERT tablename (fieldnamelist) VALUES (valuelist);SELECT @@Identity AS newID;"<BR><BR>you can then access the identity with objRS("newID")<BR><BR>(this is SQLServer 7.0 - not available in other DBs)<BR><BR>j

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts