I can not find any info on how to add a field which has a type of autotype ....
my query so far is:
CREATE TABLE tblAccTransLog (
AccTransLogID INTEGER PRIMARY KEY,
TransType INTEGER,
TransNo TEXT(50),
DateCreated DATETIME,
AccRef TEXT(50),
B2BComplete BIT);
I want AccTransLogID to be an autonumber field what do I need to add to the
above statement?
Hi,
use COUNTER or AUTOINCREMENT instead of INTEGER
With Jet 4.0 and ADO, you can also use IDENTITY and an optional seed and
increment too, as in
columnName AUTOINCREMENT( 1, 1 )
Hoping it may help,
Vanderghast, Access MVP
>I can not find any info on how to add a field which has a type of autotype
>....
[quoted text clipped - 12 lines]
> the
> above statement?
chilling - 12 Jan 2006 15:23 GMT
> use COUNTER or AUTOINCREMENT instead of INTEGER
Thanks that did it :)
Just for completion sake the code is:
CREATE TABLE tblAccTransLog2 (
AccTransLogID AUTOINCREMENT( 1, 1) PRIMARY KEY,
TransType INTEGER,
TransNo TEXT(50),
DateCreated DATETIME,
AccRef TEXT(50),
B2BComplete BIT);