LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Assignment of Primary key to field of MS Access

Hi,

How can i assign Primary key to perticular field of MS Acess in a Table throught labview.

Please help me to do this.

0 Kudos
Message 1 of 3
(3,100 Views)
You don't. That parameter is usually set when you create the table. This isn't a LabVIEW question. Learn about the Jet DBMS, Access is not a database. It is a program for creating applications that use a database. By default it uses one that is built into Windows called Jet. The best you can do in LabVIEW is use it to send an ALTER TABLE command to modify the table structure.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 3
(3,061 Views)
Actually there is no point in using LabVIEW for setting primary key, as suggested by Mike it is created during database table creation....

Just for your information.

For a primary key to work well, the field must uniquely identify each row, never contain an empty or null value, and rarely (ideally, never) change. To set the primary key:

Open the database that you want to modify.

In the Navigation Pane, right click the table in which you want to set the primary key and, on the shortcut menu, click Design View.

TIP If you don't see the Navigation Pane, press F11 to display it.

Select the field or fields that you want to use as the primary key.

To select one field, click the row selector for the field you want.

To select more than one field, hold down CTRL and then click the row selector for each field.

On the Design tab, in the Tools group, click Primary Key.

A key indicator is added to the left of the field or fields that you specify as the primary key.
0 Kudos
Message 3 of 3
(2,988 Views)