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.

class CDynamicParameterAccessor : public CDynamicAccessor  

Methods

CDynamicParameterAccessorThe constructor.
GetParamRetrieves the parameter data from the buffer.
GetParamCountRetrieves the number of parameters in the accessor.
GetParamIODetermines whether the specified parameter is an input or output parameter.
GetParamLengthRetrieves the length of the specified parameter stored in the buffer.
GetParamNameRetrieves the name of a specified parameter.
GetParamStatusRetrieves the status of the specified parameter stored in the buffer.
GetParamStringRetrieves the string data of the specified parameter stored in the buffer.
GetParamTypeRetrieves the data type of a specified parameter.
SetParamSets the buffer using the parameter data.
SetParamLengthSets the length of the specified parameter stored in the buffer.
SetParamStatusSets the status of the specified parameter stored in the buffer.
SetParamStringSets the string data of the specified parameter stored in the buffer.

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 http://support.microsoft.com/.

Header: atldbcli.h

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

Show: