Hello,
Is there any way to find the primary key of a given table?
Something similar with "GetKeyList" from ODAC or "GetFieldDesc(FieldName).IsKey" from SDAC.
Thank you,
Radu B.
How to find the PKs of a table
Re: How to find the PKs of a table
Hello,
To retrieve information about Constraint and Index, you can use the TPgMetaData component
To retrieve information about Constraint and Index, you can use the TPgMetaData component
Code: Select all
PgMetaData1.Restrictions.Values['TABLE_NAME'] := 'your_table_name';
PgMetaData1.MetaDataKind := 'Constraints'; //IndexColumns, ...
PgMetaData1.Open;
Re: How to find the PKs of a table
I succeeded in obtain the fields working with PgMetaData.
It should be better to have a more detailed help above the functionalities for this component.
Case closed.
Thank you,
Radu B.
It should be better to have a more detailed help above the functionalities for this component.
Case closed.
Thank you,
Radu B.
Re: How to find the PKs of a table
Description of this component properties is in the PgDAC documentation: http://www.devart.com/pgdac/docs/index. ... tadata.htm