Board index » delphi » Finding Primary Key of a table

Finding Primary Key of a table

Is there any way to find the primary key of a table at run time?  The
primary key does not show up in the IndexDefs property of a TTable.

Steve Dobbs

 

Re:Finding Primary Key of a table


Quote
Steve Dobbs wrote:

> Is there any way to find the primary key of a table at run time?  The
> primary key does not show up in the IndexDefs property of a TTable.

> Steve Dobbs

Did you update the indexdefs? table.indexdefs.update

Also the primary key will be the first index in the list and will have
an empty name.

Garry Kernan

Other Threads