LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Access "Autonumber" property using LabVIEW 6.1

I am having problems generating an autonumber in MS Acess for test records. I am using LabVIEW 6.1 with the database connectivity toolset. If anyone has an example, it would be appreciated.
0 Kudos
Message 1 of 6
(3,034 Views)
You don't generate the autonumber in LabVIEW. If you defined a column in Access to autonumber, every time you insert a new row, Access itself will populate the column.
0 Kudos
Message 2 of 6
(3,034 Views)
Sorry I wasn't clear with my question. I currently have 2 tables in my database. 1 table has a set of records from my application. The other table has the same set of records and ID column that is an autonumber type.

The table without the ID column works fine, but the table with the ID column won't function (Error-2147467259). I am trying to figure out how to configure my cluster to account for the extra column in the table. This is my first stab @ database vs. spreadsheet.
0 Kudos
Message 3 of 6
(3,034 Views)
I don't use the toolkit so I don't know what the error code is. You should have the text of the error. Are you trying to read or write to the table when you get the error? When I create an Insert qurty using SQL, I don't specify the autonumber column and I would think that you wouldn't define it in a cluster unless you were trying to read it.
0 Kudos
Message 4 of 6
(3,034 Views)
Hi,
You can add items using an SQL query like the one below and autonumber will be generated for you:

Example
For the Table below
ID Name
1 Joe
2 John

SQL QUERY
INSERT INTO myTestTable ([Name]) VALUES ('Mary');

I hope this helps.

Sincerely,
Feroz
National Instruments
0 Kudos
Message 5 of 6
(3,034 Views)
Thanks for the help. Things are working.
0 Kudos
Message 6 of 6
(3,034 Views)