Using Multiple Parameter Sets
Required Actions Before ICommand::Execute
Before Calling ICommand::Execute;
When using more than one parameter set, OLE DB Provider for Teradata requires the consumer to perform the following steps before calling ICommand::Execute:
1 Set the text of the command object using ICommandText::SetCommandText.
2 Define the data types for each parameter using ICommandWithParameters::SetParameterInfo.
3 Create the Accessor using IAccessor::CreateAccessor.
If the above steps are not followed, the call to ICommand::Execute returns the DB_E_PARAMNOTOPTIONAL error code and OLE DB Provider for Teradata presents the following error message:
[Teradata Database]There is a mismatch between the number of parameters specified and the number of parameters