I need the Column and Indexnames from SQL Server and therefor I created a TDAMetadata - Object with TUniConnection.CreateMetaData.
I provided Restrictions with TABLE_SCHEMA and TABLE_NAME
MetadataKind to 'Columns' and Open does not return a Result.
Also getting TABLE - Names only Works if Scope is set to local but in this Case i Get Tables and View.
I See there is another Parameter TABLE_CATALOG what do I have to assign to this Restriction or leave it empty ?
Im Using SQL Server 2005 with native client installed.
Pls Help
GetColumns for SQL Server give no Columnnames back
Please, make sure that TUniConnection is connected to a valid database.
To get the list of columns, try to use the following code:
To get the list of columns, try to use the following code:
Code: Select all
UniMetaData := UniConnection1.CreateMetaData;
UniMetaData.MetaDataKind := 'Columns';
UniMetaData.Restrictions.Values['TABLE_NAME'] := Tablename;
UniMetaData.Open;