AttachProcedure(ProcedureName: String; [MakeExternal: Boolean = False]; [Connection: ISecurityConnection = Null]);
ProcedureName. Physical name of the procedure in the database, according to the text of which the text of the current procedure is updated.
MakeExternal. Parameter that determines whether the procedure is external. If the False value is passed as the parameter value, the structure of procedure is updated, if the value is True, indicator of external procedure is set for this procedure.
Connection. Optional parameter that sets the direct connection to database.
The AttachProcedure method updates information about procedure structure in a repository, according to procedure structure on a database server. The method is also used at creation of the external procedure.
Executing the example requires that the repository contains a procedure with the Proc_1 identifier.
Sub UserProc;
Var
MB: IMetabase;
MObj: IMetabaseObject;
Pro: IProcedure;
Begin
Mb := MetabaseClass.Active;
MObj := Mb.ItemById("Proc_1").Edit;
Pro := MObj As IProcedure;
Pro.AttachProcedure("Proc_1");
Pro.Refresh;
End Sub UserProc;
After executing the example, the text of procedure Proc_1 is updated from database.
See also: