PDA

View Full Version : Create Increment (Autonumber Field) through ADO - Access


amaciel
09-22-2004, 03:33 PM
Hello there!

I've looked everywhere to find a place that would give me a SQL statement that creates (or modifies) an integer field with auto increment (Autonumber) in my MS ACCESS database.

Below are some of the statements I've tried unsuccessfully!

"CREATE TABLE table_name
(int_field INT AUTOINCREMENT)"

"CREATE TABLE table_name
(int_field INT AUTONUMBER)"

"CREATE TABLE table_name
(int_field INT COUNTER(1,1))"

"CREATE TABLE table_name
(int_field INT UNIQUE IDENTIFIER)"

Can someone please help me!

Thanks in advance.

Andre.

BuddhaMan
09-22-2004, 07:09 PM
Here's a way to do it using ADOX:

http://p2p.wrox.com/topic.asp?TOPIC_ID=893

More info:

http://www.able-consulting.com/ADOX_Faq.htm

http://support.microsoft.com/default.aspx?scid=kb;en-us;252908