RAD Studio VCL Reference
|
Locates the parameter with a given name.
function ParamByName(const Value: WideString): TParameter;
__fastcall TParameter ParamByName(const BSTR Value);
Use ParamByName method to find a parameter with the name specified in Value. If a match is found, ParamByName returns a reference to the corresponding TParameter object. Otherwise, the TParameter reference is nil (Delphi) or NULL (C++) and an exception is raised. Use this method rather than a direct reference to the Items property to avoid depending on the order of the entries.
ADOQuery1.Parameters.ParamByName('Verb').Value := 'propitiate'; ADOQuery1.Open;
ADOQuery1->Parameters->ParamByName("Verb")->Value = "propitiate"; ADOQuery1->Open();
To locate a parameter by name without raising an exception if the parameter is not found, use the FindParam method.
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.
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
|
What do you think about this topic? Send feedback!
|