Show contents 

Db > Db Assembly Interfaces > ISQLCommand > ISQLCommand.Text

ISQLCommand.Text

Syntax

Text(DriverName: String): String;

Parameters

DriverName. DBMS driver identifier.

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.

Comments

The list of identifiers that can be used as a value of the DriverName parameter is given in the Summary List of Identifiers section.

Example

Sub UserProc;
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 SQL command";
    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 UserProc;

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