Trying to add autonumber field to table

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

This syntax is not working

ALTER TABLE tblImport_tmp_NOTinModels ADD COLUMN ID IDENTITY (1,1

Also, how do I know I'm utilitzing OLE DB for Jet, which is what supports the Identity syntax?
 
Hi,


It should work if you use ADO. It does not work if you use DAO, or if
you use the query designer (which uses DAO for you). As example, with Access
2000 or later, in the Immediate Debug Window:

CurrentProject.Connection.Execute " ALTER TABLE
tblImport_tmp_NOTinModels ADD COLUMN ID IDENTITY (1,1) "


Hoping it may help,
Vanderghast, Access MVP


Perico said:
This syntax is not working:

ALTER TABLE tblImport_tmp_NOTinModels ADD COLUMN ID IDENTITY (1,1)

Also, how do I know I'm utilitzing OLE DB for Jet, which is what supports
the Identity syntax?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top