How do I display a maximum ID value in Asp

Results 1 to 2 of 2

Thread: How do I display a maximum ID value in Asp

  1. #1
    Join Date
    Dec 1969
    Posts
    309

    Default How do I display a maximum ID value in Asp

    I know the SQL to get the max value of an ID is: <BR>Select Max(ID)from TableName<BR><BR>I need to maintain a unique ID numbering of all records in the database. I&#039ve learned the "Autonumber" functionality of Access does not work well in ASP.<BR>How do I set a variable in the ASP equal to the above SQL value and use it to increment my ID numbers when adding new records from the ASP?

  2. #2
    Steve Rowson Guest

    Default RE: How do I display a maximum ID value in Asp

    I never have any problem inserting new records into an Access database with an AutoNumber field as the primary key. I regularly add new records, find the new record by doing RSmax etc and then adding the &#039many&#039 records related to that number. What problems do you have? It is easy to increment a value in ASP but there is nothing Access likes better that its own AutoNumber field type as the primary key.

Posting Permissions

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