CDynamicParameterAccessor Class

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at CDynamicParameterAccessor Class.

Similar to CDynamicAccessor but obtains parameter information to be set by calling the ICommandWithParameters interface.

Syntax

class CDynamicParameterAccessor : public CDynamicAccessor  

Members

Methods

CDynamicParameterAccessor The constructor.
GetParam Retrieves the parameter data from the buffer.
GetParamCount Retrieves the number of parameters in the accessor.
GetParamIO Determines whether the specified parameter is an input or output parameter.
GetParamLength Retrieves the length of the specified parameter stored in the buffer.
GetParamName Retrieves the name of a specified parameter.
GetParamStatus Retrieves the status of the specified parameter stored in the buffer.
GetParamString Retrieves the string data of the specified parameter stored in the buffer.
GetParamType Retrieves the data type of a specified parameter.
SetParam Sets the buffer using the parameter data.
SetParamLength Sets the length of the specified parameter stored in the buffer.
SetParamStatus Sets the status of the specified parameter stored in the buffer.
SetParamString Sets the string data of the specified parameter stored in the buffer.

Remarks

The provider must support ICommandWithParameters for the consumer to use this class.

The parameter information is stored in a buffer created and managed by this class. Obtain parameter data from the buffer by using GetParam and GetParamType.

For an example demonstrating how to use this class to execute a SQL Server stored procedure and get the output parameter values, see Knowledge Base article Q058860, "HOWTO: Execute Stored Procedure using CDynamicParameterAccessor." Knowledge Base articles are available in the MSDN Library Visual Studio documentation or at https://support.microsoft.com/.

Requirements

Header: atldbcli.h

See Also

OLE DB Consumer Templates
OLE DB Consumer Templates Reference
CAccessor Class
CDynamicAccessor Class
CManualAccessor Class