FireDAC.Comp.Client.TFDMetaInfoCommand.SchemaName

From RAD Studio API Documentation
Jump to: navigation, search

[–] Properties
Type: property
Visibility: published
Source:
FireDAC.Comp.Client.pas
FireDAC.Comp.Client.hpp
Unit: FireDAC.Comp.Client
Parent: TFDMetaInfoCommand

Delphi

property SchemaName;

C++

__property SchemaName = {default=0};

Description

Identifies name of the schema for some kinds of the command.

FireDAC.Comp.Client.TFDMetaInfoCommand.SchemaName inherits from FireDAC.Comp.Client.TFDCustomCommand.SchemaName. All content below this line refers to FireDAC.Comp.Client.TFDCustomCommand.SchemaName.

Identifies name of the schema for some kinds of the command.

The SchemaName identifies the name of the schema where the command object resides. The meaning depends on CommandKind and MetainfoKind:

  • If CommandKind is in [skStoredProc, skStoredProcWithCrs, skStoredProcNoCrs], then SchemaName specifies the name of the schema, where the procedure resides.
  • If MetainfoKind is not mkNone, then SchemaName specifies the name of the schema, where the described object resides.

Example

//Example 1:
ADCommand1.SchemaName := 'SCOTT';
ADCommand1.CommandText.Text := 'PROC1';
ADCommand1.CommandKind := skStoredProc;
ADCommand1.Prepare;
ADCommand1.Params[0].AsInteger := 100;
ADCommand1.Params[1].AsString := 'Bill Gates';
ADCommand1.Execute;

//Example 2:
ADMetaInfoCommand1.SchemaName := 'ADDEMO';
ADMetaInfoCommand1.ObjectName := 'MY_TAB';
// or on Oracle just ADMetaInfoCommand1.ObjectName := 'ADDEMO.MY_TAB';
ADMetaInfoCommand1.MetaInfoKind := mkTableFields;
ADMetaInfoCommand1.Open;

See Also