Retrieving table column names using the Firebird provider
Posted: Thu 16 Oct 2008 09:41
Hi,
I'm trying to retrieve the column names of a specified table from a Firebird 2.0.4 database (embedded) using UniDAC 1.2 under D2007. The code I write is:
LMetaData := TUniMetaData(IConnection.CreateMetaData);
try
LMetaData.MetaDataKind := 'Columns';
LMetaData.Restrictions.Values['TABLE_NAME'] := TableName;
LMetaData.Open;
LMetaData.GetMetaDataKinds(AList);
finally
LMetaData.Free;
end;
... however, the result in AList is not the column names from the table but instead the list is filled with all available MetaDataKind restrictions (Columns, Constraints, IndexColumns, ... ). Am I doing something wrong or is this a bug?
Many thanks in advance for your help.
Best regards,
/T
I'm trying to retrieve the column names of a specified table from a Firebird 2.0.4 database (embedded) using UniDAC 1.2 under D2007. The code I write is:
LMetaData := TUniMetaData(IConnection.CreateMetaData);
try
LMetaData.MetaDataKind := 'Columns';
LMetaData.Restrictions.Values['TABLE_NAME'] := TableName;
LMetaData.Open;
LMetaData.GetMetaDataKinds(AList);
finally
LMetaData.Free;
end;
... however, the result in AList is not the column names from the table but instead the list is filled with all available MetaDataKind restrictions (Columns, Constraints, IndexColumns, ... ). Am I doing something wrong or is this a bug?
Many thanks in advance for your help.
Best regards,
/T