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?
 
Back
Top