Grabbing a new identity value

Results 1 to 2 of 2

Thread: Grabbing a new identity value

  1. #1
    Wil Wong Guest

    Default Grabbing a new identity value

    Hello all, here&#039;s my problem.<BR><BR>If I am inserting a new row in the a table of the database where the PK has an identity(which is the only unique number for the columns) how would I be able to know what that ID number is?<BR><BR>For example, 2 column DB with names ID(int), Name(char)<BR><BR>ID Name <BR>4 Tom <BR>5 Jay <BR><BR>The ID is the PK and is signified as an identity. If I enter a new record, it will have a ID of 6. I would like to grab the ID but since Name is not unique how would I be able to do that?<BR><BR>Thanks for your help in advance!<BR><BR>Wil

  2. #2
    Join Date
    Dec 1969

    Default Check out...

    ...the tips and tricks section of . There is an example for SQL Server and MS Access.

Posting Permissions

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