Data.Win.ADODB.TParameters.FindParam

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function FindParam(const Value: WideString): TParameter;

C++

TParameter* __fastcall FindParam(const System::WideString Value);

Properties

Type Visibility Source Unit Parent
function public
Data.Win.ADODB.pas
Data.Win.ADODB.hpp
Data.Win.ADODB TParameters

Description

Locates the parameter with a given name.

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.

See Also