LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Create Table in Access with autoincrement field

Solved!
Go to solution

Hello,

 

 

I like to create a new table in an access database. 

The problem is to create an ID field with autoincrement. I can add "not null" and "primary key" to the field but not the "autoincrement" option.

 

Do you have a solution for that problem?

 

Thank you

Marcus

0 Kudos
Message 1 of 11
(5,117 Views)

Field i.e. new record or new column?

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 2 of 11
(5,110 Views)

Hi Ranjeet_Singh,

 

thanks for your replay.

I create a new table with a new column called "ID" which schoud be "autoincrement".

 

The records will be added later.

0 Kudos
Message 3 of 11
(5,106 Views)

Isn't that a question for Microsoft, the Access help, or a simple google search?

0 Kudos
Message 4 of 11
(5,095 Views)

Through SQL you can change the column name I think.

 

Just google the topic

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 5 of 11
(5,085 Views)

I think it is a problem with the Database Connectivity Toolkit (DCT).

 

I changed from the ADO Toolkit (http://www.ib-berger.com/index.php?action=adotool) to the DCT.

With ADO it worked fine. But I have to change the code to the DCT. Actually most thinks are working but the autoincrement makes the only problem.

 

Access_Create.JPG
The Picture shows the code of creation.

Hope you can help me. 

 

It is no option to create the tables manually.

 

Thanks for your help.

0 Kudos
Message 6 of 11
(5,061 Views)

May be but this is also because all database providers not provide all the functionality. 

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 7 of 11
(5,050 Views)

Here must be an option to read the current primary key number. Search

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 8 of 11
(5,047 Views)
Solution
Accepted by topic author Marcus_Körner

Access autoincrement

 

It seems that if the Autoincrement doesn't work you can try Counter as column specification.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 9 of 11
(5,044 Views)

Hope this helps him. Good job

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 10 of 11
(5,040 Views)