View Full Version : insert values to access table

01-17-2007, 10:12 AM
Hi all,

i have created a table in MSAccess and the primary key i have set to Autonumber.
but while inserting from the code part how i can give a value to the primary key in the insert statement.

please give me a solution as soon as possible
thanks in advance

01-17-2007, 10:51 AM
primary key as an autonumber means the number increases by 1 by each row,
you can not change an autonumber...

leave the autonumber out of the insert statement and jus tinsert your other data...

01-17-2007, 11:18 AM
the problem is if i leave primary key its says wrong no of arguements passed to the query.

01-17-2007, 04:38 PM
Post your SQL...