RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TAdoDbxConnection.GetSchema Method ()

Gets schema information for the connected data source.

Pascal
function GetSchema: DataTable; override;
function GetSchema(Name: String): DataTable; override;
function GetSchema(Name: String; Restrictions: array of String): DataTable; override;
C++
virtual __fastcall DataTable GetSchema();
virtual __fastcall DataTable GetSchema(AnsiString Name);
virtual __fastcall DataTable GetSchema(AnsiString Name, array of String Restrictions);

GetSchema obtains a DataTable with schema information for the connected data source. 

The Name parameter specifies the kind of metadata to get. The standard names supported by DbConnection.GetSchema are supported.  

In addition, you can specify one of the name constants in the DBXMetaDataNames class TDBXMetaDataCollectionName to get a particular metadata collection. You would then use the corresponding class in the DBXMetaDataNames namespace to get the column information you want for that metadata collection.  

For instance, to get procedure source code in a database, use the constant ProcedureSources to get a DataTable with procedure source information. Use the DBXMetaDataNames classes TDBXProcedureSourcesColumns and TDBXProcedureSourcesIndex with the returned DataTable to access the procedure source information by name or ordinal. 

 

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