RAD Studio
ContentsIndex
PreviousUpNext
Binding Parameters

When you prepare and execute a stored procedure, its input parameters are automatically bound to parameters on the server. 

TStoredProc lets you use the ParamBindMode property to specify how parameters should be bound to the parameters on the server. By default ParamBindMode is set to pbByName, meaning that parameters from the stored procedure component are matched to those on the server by name. This is the easiest method of binding parameters. 

Some servers also support binding parameters by ordinal value, the order in which the parameters appear in the stored procedure. In this case the order in which you specify parameters in the parameter collection editor is significant. The first parameter you specify is matched to the first input parameter on the server, the second parameter is matched to the second input parameter on the server, and so on. If your server supports parameter binding by ordinal value, you can set ParamBindMode to pbByNumber.

Tip: If you want to set ParamBindMode to pbByNumber, you need to specify the correct parameter types in the correct order.

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