RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TIBQuery.ParamByName Method

Accesses parameter information based on a specified parameter name.

Pascal
function ParamByName(const Value: string): TParam;
C++
__fastcall TParam ParamByName(const AnsiString Value);

Call ParamByName to set or use parameter information for a specific parameter based on its name. 

Value is the name of the parameter for which to retrieve information. 

ParamByName is primarily used to set an parameter's value at runtime. For example, the following statement retrieves the current value of a parameter called 'Contact' into an edit box:

   Edit1.Text := Query1.ParamByName('Contact').AsString;
       Edit1->Text = Query1->ParamByName("Contact")->AsString;

 

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