IProcedure.AlterProcedure

Syntax

AlterProcedure(OldProcedure: IProcedure; [Options: Integer = 0]);

Parameters

OldProcedure. A procedure the structure of which must be updated according to the structure of current procedure.

Options. Reserved parameter.

Description

The AlterProcedure method updates the structure of the OldProcedure procedure on database server according to structure of current procedure.

Example

Executing the example requires that the repository contains a procedure with the Proc_1 identifier.

Sub UserProc;
Var
    Mb: IMetabase;
    MObj: IMetabaseObject;
    Proc: IProcedure;
Begin
    Mb := MetaBaseClass.Active;
    MObj := Mb.ItemById("Proc_1").Edit;
    Proc := MObj As IProcedure;
    Proc.Text("ORCL") :=
        "As" + #13 + #10 +
        "Begin" + #13 + #10 +
        "Insert Into Table_1 values(0,'Value 0');" + #13 + #10 +
        "Insert Into Table_1 values(1,'Value 1');" + #13 + #10 +
        "End;";
    Proc.AlterProcedure(Proc);
End Sub UserProc;

After executing the example, the procedure Proc_1 text is changed on database server without changing the text of the procedure in repository.

See also:

IProcedure