RAD Studio VCL Reference
TParameters.FindParam Method

Locates the parameter with a given name.

function FindParam(const Value: WideString): TParameter;
__fastcall TParameter FindParam(const BSTR Value);

Use FindParam method to find a parameter with the name specified in Value. If a match is found, FindParam returns a reference to the TParameter object (assignment-compatible with TParam objects) for the parameter of the specified name. Otherwise, it returns nil (Delphi) or NULL (C++). Use this method rather than a direct reference to the Items property to avoid depending on the order of the entries. 

To locate more than one parameter at a time, by name, use the GetParamList method instead. To get only the value of a named parameter, use the ParamValues property.

Note: FindParam operates with the name of a parameter as it appears in an SQL statement or stored procedure, not the Name property of a TParameter object. The two ways of referring to a parameter should not be confused.


Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!