Adding new records

Results 1 to 2 of 2

Thread: Adding new records

  1. #1
    Join Date
    Dec 1969

    Default Adding new records

    I&#039m using access as my database and I&#039m having problems adding new records through ASP applications. They always seem to put "0" as the AutoNumber and I can&#039t seem to edit the ASP script to where I can change the AutoNumber. <BR><BR>Thank you very much for any help or ideas,<BR>Pete

  2. #2
    Franco Guest

    Default RE: Adding new records

    Pete,<BR><BR>You shouldn&#039t need to manually work with the autonumber yourself: when a new record is added, Access or SQL S. should give you a new primary key value. Say, if you had a table called Books with fields BookID (autonumber), BookName and BookAuthor, you would insert values in this fashion:<BR><BR>INSERT INTO Books (BookName, BookAuthor) VALUES (&#039ASP for beginners&#039, &#039Workshy Programmers Inc.&#039)<BR><BR>(only joking guys)<BR><BR>hth<BR>Franco

Posting Permissions

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