Using Multiple Parameter Sets - OLE DB Provider for Teradata

OLE DB Provider for Teradata User Guide

Product
OLE DB Provider for Teradata
Release Number
15.00
Language
English (United States)
Last Update
2018-09-28
dita:id
B035-2498
Product Category
Teradata Tools and Utilities

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