inserting AutoNumber

Results 1 to 2 of 2

Thread: inserting AutoNumber

  1. #1
    Join Date
    Dec 1969

    Default inserting AutoNumber

    Hi,<BR><BR>I am trying to insert into a Access DB Table, which has a autonumber field.<BR><BR>When I insert using a sql statement from ASP, what value should I use for that field?<BR><BR>ravi<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: inserting AutoNumber

    hi,<BR><BR>you are not able to insert into an autonumber field, that is automacially done (incremented) by access. having said that, for example, if you have a table, named table_zoo with the following attributes:<BR><BR>table_zoo<BR>---------<BR>animal_id (**autonumber type)<BR>animal_name<BR>animal_weight<BR><BR>then your SQL statement would look like this:<BR>INSERT INTO table_zoo (animal_name, animal_desc)<BR>VALUES (&#039Tiger&#039,&#039 300&#039)<BR><BR>and animal_id would automatically be incremented. hope this helps! :)

Posting Permissions

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