RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TStoredProc.ParamBindMode Property

Determines the order in which a component's parameters are assigned to the parameter list for the stored procedure on the server.

Pascal
property ParamBindMode: TParamBindMode;
C++
__property TParamBindMode ParamBindMode;

Examine or set ParamBindMode to determine the order in which parameters in the Params property are matched to the parameters used by the stored procedure on the server. ParamBindMode can be one of the following:

Value 
Ordering 
pbByName  
Parameters specified in the Params property are matched to identically named parameters on the server. This is the default.  
pbByNumber  
Parameters in Params are assigned one-by-one to the next available parameter on the server (for example, the first parameter in Params is assigned to the first parameter used by the stored procedure, and so on).  

Whenever possible, ParamBindMode should be pbByName. This guarantees that parameters are matched to the correct parameters used by the stored procedure regardless of physical ordering in Params. At design time, the names of known parameters appear in the Parameters editor. 

In some cases stored procedures on the server (for example, Informix) do not provide the Borland Database Engine (BDE) with parameter names. If parameter names as they exist on the server side are not known at design or runtime, it may be necessary to set ParamBindMode to pbByNumber. In this case, however, it is necessary to know the correct data type for each parameter in sequence. Otherwise an exception may be raised on execution. 

 

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