DataType: DbDataType;
The DataType property determines a type of data that the parameter can receive.
Executing the example requires that the repository contains an object with the OBJTEST identifier.
Sub UserProc;
Var
MB: IMetabase;
MObj: IMetabaseObject;
Params: IMetabaseObjectParams;
Param: IMetabaseObjectParam;
Begin
MB := MetabaseClass.Active;
MObj := MB.ItemById("OBJTEST").Edit;
Params := MObj.Params;
// Create parameter
Param := Params.Add;
Param.DataType := DbDataType.Integer;
Param.Name := "Coefficient value";
Param.DefaultValue := 100;
// Save changes
MObj.Save;
End Sub UserProc;
A new parameter is created for the specified object after executing this example. Integer numbers are specified as values for current parameter. Default value is 100.
See also: