|Important||This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.|
How to: Set a Data Column as the Primary Key
Setting a data column as the primary key guarantees that each record contains a unique value. Only one primary key can be assigned to a data table. You create a primary key in a data table using the Dataset Designer.
To set a data column to be the primary key in a data table
Open your dataset in the Dataset Designer.
Right-click the column you want to set as the primary key. Click Set Primary Key.
A key icon appears next to the selected column(s).