ISQLCommand.Text

Syntax

Text(DriverName: String): String;

Parameters

DriverName. DBMS driver identifier. The summary list of identifiers that can be specified as a parameter value is given in the Supported DBMS subsection.

Description

The Text property determines the text of SQL query of the DBMS command operator for certain DBMS driver. The driver identifier is passed by the DriverName parameter.

Example

Sub Main;

Var

MB: IMetabase;

CrInfo: IMetabaseObjectCreateInfo;

MObj: IMetabaseObject;

SQLCom: ISQLCommand;

Begin

MB := MetabaseClass.Active;

CrInfo := MB.CreateCreateInfo;

CrInfo.ClassID := MetabaseObjectClass.KE_CLASS_SQLCOMMAND;

CrInfo.Id := "NewSqlCommand";

CrInfo. Name: = new command SQL;

CrInfo.Parent := MB.Root;

MObj := MB.CreateObject(CrInfo).Edit;

SQLCom := MObj As ISQLCommand;

SQLCom.Database := MB.ItemById("BD").Bind As IDatabase;

SQLCom.Text("ORCL8") := "Insert Into Table_1(Field1, Field2) Values(12, '12')";

MObj.Save;

End Sub Main;

After executing the example a new DBMS Command is created in repository root. At executing this command one new record is inserted into the Table_1 table.

See also:

ISQLCommand