ODBCDatabase.PrimaryKeys
From Xojo Documentation
Method
ODBCDatabase.PrimaryKeys(TableName as String) As RecordSet
Supported for all project types and targets.
Supported for all project types and targets.
Returns a RecordSet containing the column names that make up the primary key for a table.
References
Example
Displays the primary keys for a table: