TAstaParamList.FastAdd


 

Applies to
TAstaParamList

 

Declaration

procedure FastAdd(Value: Variant);overload;

procedure FastAdd(AName:String;Value: Variant);overload;

procedure FastAdd(AName:String;ADataType:TFieldtype; AValue:Variant);overload;

procedure FastAdd(Value: TAstaParamItem);overload;

 

Description
This procedure allows you to easily values to an AstaParamList. Internally the
Add method is called, a name for the parameter is assigned and the Value property is used to set the incoming Value.

 

Example

FastAdd('Hello World'); //adds string

FastAdd(Now); //adds datetime

FastAdd(4.33); //adds float

FastAdd(5); //adds smallint

FastAdd(True); //adds Boolean

       

Streams cannot be added this way, but you can use FastAdd('') and then Params[Count - 1].AsStream to add a stream.

 

Variations
procedure FastAdd(Value: TAstaParamItem); overload;

This allows you to add a parameter whose value is taken from another TAstaParamItem.

 

procedure FastAdd(AName: string; Value: Variant); overload;

This allows you to add a named parameter and value in the same step for Delphi 4 and 5. For Delphi 3, use procedure AddNamedParam(AName: string; Value: Variant).

 

procedure FastAdd(AName:String;ADataType:TFieldtype;AValue: Variant); overload;

This allows you to add a named parameter, datatype and value in the same step for Delphi 4 and 5.

 

 



ASTA Overview TAstaParamList.CreateFromString TAstaParamList Methods