RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TDBXMetaDataCommands Class

List of available metadata commands to get metadata.

Pascal
TDBXMetaDataCommands = class;
C++
class TDBXMetaDataCommands;

DBXCommon

You can use metadata commands to get database metadata, such as a list of tables in a database. Set the TDBXCommand.CommandType property to TDBXCommandTypes.DBXMetadata and set TDBXCommand.Text to one of the constants in the table to acquire the designated metadata. TDBXCommand.ExecuteQuery returns a TDBXReader to access the metadata. 

This table lists the types of metadata you can obtain.

Constant 
Description 
Set TDBXCommand.Text to 'GetDatabase'. When the command is executed, a TDBXReader instance is returned with a single row of database specific metadata.  
Set TDBXCommand.Text to 'GetDataTypes'. When the command is executed, a TDBXReader instance is returned with metadata for the data types supported by the driver.
The TDBXDataTypesColumns and TDBXDataTypesIndex classes describe and provide access to this metadata's columns.  
Set TDBXCommand.Text to 'GetTables [catalog.[schema.[table]]] [table-types]'. 'table-types' is a space separated list of one or more of the constants in TDBXMetadataTableTypes. When the command is executed, a TDBXReader instance is returned with metadata for the specified table(s).
The TDBXTablesColumns and TDBXTablesIndex classes describe and provide access to this metadata's columns.  
Set TDBXCommand.Text to 'GetColumns [catalog.[schema.[table]]]'. When the command is executed, a TDBXReader instance is returned with metadata for the columns of the specified table(s).
The TDBXColumnsColumns and TDBXColumnsIndex classes describe and provide access to this metadata's columns.  
Set TDBXCommand.Text to 'GetForeignKeys [catalog.[schema.[table]]]'. When the command is executed, a TDBXReader instance is returned with metadata for the foreign keys of the specified table(s).
The TDBXForeignKeysColumns and TDBXForeignKeysIndex classes describe and provide access to this metadata's columns.  
Set TDBXCommand.Text to 'GetForeignKeyColumns [[[catalog.]schema.]table [foreign-key] [PrimaryKey|ForeignKey]]'[PrimaryKey|ForeignKey]. When the command is executed, a TDBXReader instance is returned with metadata for each column pair in the specified foreign keys of the specified table(s).
The TDBXForeignKeyColumnsColumns and TDBXForeignKeyColumnsIndex classes describe and provide access to this metadata's columns.  
Set TDBXCommand.Text to
'GetIndexes [[[catalog.]schema.]table]'. When the command is executed, a TDBXReader instance is returned with metadata for the indexes of the specified table(s).
The TDBXIndexesColumns and TDBXIndexesIndex classes describe and provide access to this metadata's columns.  
Set TDBXCommand.Text to
'GetIndexColumns [[[catalog.]schema.]table [index]]'. When the command is executed, a TDBXReader instance is returned with metadata for the columns in the indexes of the specified table(s).
The TDBXIndexColumnsColumns and TDBXIndexColumnsIndex classes describe and provide access to this metadata's columns.  
Set TDBXCommand.Text to 'GetPackages'. When the command is executed, a TDBXReader instance is returned with metadata for the specified package(s).
The TDBXPackagesColumns and TDBXPackagesIndex classes describe and provide access to this metadata's columns.  
Set TDBXCommand.Text to 'GetProcedures [catalog.][schema.][procedure]'. When the command is executed, a TDBXReader instance is returned with metadata for the specified procedure(s).
The TDBXProceduresColumns and TDBXProceduresIndex classes describe and provide access to this metadata's columns.  
Set TDBXCommand.Text to 'GetProcedureParameters [[[catalog.]schema.]procedure]'. When the command is executed, a TDBXReader instance is returned with metadata about the parameters of the specified procedure(s).
The TDBXProcedureParametersColumns and TDBXProcedureParametersIndex classes describe and provide access to this metadata's columns.  
Set TDBXCommand.Text to 'GetUsers'. When the command is executed, a TDBXReader instance is returned with metadata for the specified user(s).
The TDBXUsersColumns and TDBXUsersIndex classes describe and provide access to this metadata's columns.  

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!