AnyDAC
ContentsIndexHome
PreviousUpNext
TADMetaInfoCommand.ObjectName Property

Gets / sets the name of object to get detailed information about it.

Group
Links

The ObjectName property value defines the database objects, for which will be returned detailed information. The meaning, optionality and usage of catalog and schema names depends on MetaInfoKind:

MetaInfoKind 
Meaning 
Catalog and schema names 
mkTableFields 
Table name. 
Applicable. 
mkIndexes 
Table name. 
Applicable. 
mkIndexFields 
Index name. 
-- 
mkPrimaryKey 
Table name. 
Applicable. 
mkForeignKeys 
Table name. 
Applicable. 
mkForeignKeyFields 
Foreign key constraint name. 
-- 
mkProcArgs 
Stored procedure name. 
Applicable, for non-packages stored procedures. 

The ObjectName together with CatalogName and SchemaName may constitute the full object name. If object name is case sensitive or contains special character, then it must be explicitly quoted. 

Assignment to this property value closes dataset.

property ObjectName: String;
var
  oTab: TADDatSTable;
....
  ADMetaInfoCommand1.CatalogName := 'Northwind';
  ADMetaInfoCommand1.SchemaName := 'dbo';
  ADMetaInfoCommand1.ObjectName := 'Employees';
  ADMetaInfoCommand1.MetaInfoKind := mkTableFields;
  ADMetaInfoCommand1.Define(oTab);
  ADMetaInfoCommand1.Open(oTab);
  ADMetaInfoCommand1.Fetch(oTab, True);
What do you think about this topic? Send feedback!