Results 1 to 3 of 3
  1. #1
    5 Star Lounger AndrewKKWalker's Avatar
    Join Date
    Apr 2001
    Location
    Cambridge, UK
    Posts
    1,020
    Thanks
    0
    Thanked 3 Times in 3 Posts

    IDENTITY on SQL ODBC Table (Access 2000 and SQL SERVER 2005)

    I have an Access database that uses some ODBC tables linked to SQL server 2005
    At times it is necessary to find the IDENTITY for an Autonumber field when the record is first generated.

    In Access this was no problem because the value is assigned as the first character is entered in any field

    BUT in SQL linkerd tables the value is NOT assigned until the record is saved
    (which actually is much more sensible really)

    I have got round the problem by forcing certain priority field on the form to be filled and then grabbing the required value during the After Insert Event

    Is ther anyway to get this value any earlier.

    I suspect not.

    Thanks
    Andrew

  2. #2
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: IDENTITY on SQL ODBC Table (Access 2000 and SQL SERVER 2005)

    I don't think there is a way to get this number any earlier. I'm probably doing pretty much the same thing you are when I need to grab it.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  3. #3
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: IDENTITY on SQL ODBC Table (Access 2000 and SQL SERVER 2005)

    The value doesn't exist until the record is committed, so no, there is no way to get it earlier.
    Charlotte

Posting Permissions

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