Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

insert where autonumber exists in table?????

Status
Not open for further replies.

Efa

Programmer
Jul 9, 2001
18
0
0
AU
Can anyone help me with a basic query. I'm inserting details into a access database from a java servlet. My table contains the following

ID - autoNumber
fisrt - string
last - string


My problem is my data won't insert when i use the auto number. Am i doing something wrong. If i don't use the autoNumber is adds fine but i need this feature.

Any help is greatly appreciated.


Efa
 
It might help to see the query statement you are using for the insert. However, I suspect you have the ID field in the insert statement. This is a no no. Remove the ID field from the insert statement - Access will automatically populate the ID field.

Joe.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top