ICommandWithParameters

This section describes Jet-specific implementation of the ICommandWithParameters interfaces. This includes ICommandWithParameters::GetParameterInfo, ICommandWithParamaters::MapParameterInfo, and ICommandWithParameters::SetParameterInfo.

This interface encapsulates parameters. Parameters are scalar values, or a vector of scalar values, typically expressed in predicates but possibly supported by many providers in any scalar expression.

For scalar parameters of prepared commands, there is a presumption that different parameter values do not require different plans. In other words, a single preparation and its resulting plan are satisfactory for all possible values of scalar parameters.

Parameter values are set when a command is executed. Methods are included here to offer a means for setting and obtaining a list of parameters and their types.

Method Description
GetParameterInfo Gets a list of the command’s parameters, their names and their types.
MapParameterNames Returns an array of column ordinals when given named parameters.
SetParameterInfo Specifies the native data type of each parameter.

ICommandWithParameters::GetParameterInfo

Gets a list of the command’s parameters, their names, and their types. For information on how this interface is implemented, see the OLE DB Programmer’s Reference.

ICommandWithParameters::MapParameterNames

Returns an array of column ordinals when given named parameters. For information on how this interface is implemented, see the OLE DB Programmer’s Reference.

ICommandWithParameters::SetParameterInfo

Specifies the native data type of each parameter. For information on how this interface is implemented, see the OLE DB Programmer’s Reference.