You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
title: "CDynamicParameterAccessor Class | Microsoft Docs"
3
3
ms.custom: ""
4
-
ms.date: "11/04/2016"
4
+
ms.date: "02/14/2018"
5
5
ms.reviewer: ""
6
6
ms.suite: ""
7
7
ms.technology: ["cpp-windows"]
@@ -18,47 +18,51 @@ manager: "ghogen"
18
18
ms.workload: ["cplusplus", "data-storage"]
19
19
---
20
20
# CDynamicParameterAccessor Class
21
-
Similar to [CDynamicAccessor](../../data/oledb/cdynamicaccessor-class.md) but obtains parameter information to be set by calling the [ICommandWithParameters](https://msdn.microsoft.com/en-us/library/ms712937.aspx) interface.
22
-
21
+
22
+
Similar to [CDynamicAccessor](../../data/oledb/cdynamicaccessor-class.md) but obtains parameter information to be set by calling the [ICommandWithParameters](/sql/relational-databases/native-client-ole-db-interfaces/icommandwithparameters) interface.
|[GetParam](../../data/oledb/cdynamicparameteraccessor-getparam.md)|Retrieves the parameter data from the buffer.|
37
-
|[GetParamCount](../../data/oledb/cdynamicparameteraccessor-getparamcount.md)|Retrieves the number of parameters in the accessor.|
38
-
|[GetParamIO](../../data/oledb/cdynamicparameteraccessor-getparamio.md)|Determines whether the specified parameter is an input or output parameter.|
39
-
|[GetParamLength](../../data/oledb/cdynamicparameteraccessor-getparamlength.md)|Retrieves the length of the specified parameter stored in the buffer.|
40
-
|[GetParamName](../../data/oledb/cdynamicparameteraccessor-getparamname.md)|Retrieves the name of a specified parameter.|
41
-
|[GetParamStatus](../../data/oledb/cdynamicparameteraccessor-getparamstatus.md)|Retrieves the status of the specified parameter stored in the buffer.|
42
-
|[GetParamString](../../data/oledb/cdynamicparameteraccessor-getparamstring.md)|Retrieves the string data of the specified parameter stored in the buffer.|
43
-
|[GetParamType](../../data/oledb/cdynamicparameteraccessor-getparamtype.md)|Retrieves the data type of a specified parameter.|
44
-
|[SetParam](../../data/oledb/cdynamicparameteraccessor-setparam.md)|Sets the buffer using the parameter data.|
45
-
|[SetParamLength](../../data/oledb/cdynamicparameteraccessor-setparamlength.md)|Sets the length of the specified parameter stored in the buffer.|
46
-
|[SetParamStatus](../../data/oledb/cdynamicparameteraccessor-setparamstatus.md)|Sets the status of the specified parameter stored in the buffer.|
47
-
|[SetParamString](../../data/oledb/cdynamicparameteraccessor-setparamstring.md)|Sets the string data of the specified parameter stored in the buffer.|
48
-
49
-
## Remarks
50
-
The provider must support `ICommandWithParameters` for the consumer to use this class.
51
-
52
-
The parameter information is stored in a buffer created and managed by this class. Obtain parameter data from the buffer by using [GetParam](../../data/oledb/cdynamicparameteraccessor-getparam.md) and [GetParamType](../../data/oledb/cdynamicparameteraccessor-getparamtype.md).
53
-
54
-
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/](http://support.microsoft.com).
55
-
56
-
## Requirements
57
-
**Header**: atldbcli.h
58
-
59
-
## See Also
60
-
[OLE DB Consumer Templates](../../data/oledb/ole-db-consumer-templates-cpp.md)
61
-
[OLE DB Consumer Templates Reference](../../data/oledb/ole-db-consumer-templates-reference.md)
|[GetParam](../../data/oledb/cdynamicparameteraccessor-getparam.md)|Retrieves the parameter data from the buffer.|
38
+
|[GetParamCount](../../data/oledb/cdynamicparameteraccessor-getparamcount.md)|Retrieves the number of parameters in the accessor.|
39
+
|[GetParamIO](../../data/oledb/cdynamicparameteraccessor-getparamio.md)|Determines whether the specified parameter is an input or output parameter.|
40
+
|[GetParamLength](../../data/oledb/cdynamicparameteraccessor-getparamlength.md)|Retrieves the length of the specified parameter stored in the buffer.|
41
+
|[GetParamName](../../data/oledb/cdynamicparameteraccessor-getparamname.md)|Retrieves the name of a specified parameter.|
42
+
|[GetParamStatus](../../data/oledb/cdynamicparameteraccessor-getparamstatus.md)|Retrieves the status of the specified parameter stored in the buffer.|
43
+
|[GetParamString](../../data/oledb/cdynamicparameteraccessor-getparamstring.md)|Retrieves the string data of the specified parameter stored in the buffer.|
44
+
|[GetParamType](../../data/oledb/cdynamicparameteraccessor-getparamtype.md)|Retrieves the data type of a specified parameter.|
45
+
|[SetParam](../../data/oledb/cdynamicparameteraccessor-setparam.md)|Sets the buffer using the parameter data.|
46
+
|[SetParamLength](../../data/oledb/cdynamicparameteraccessor-setparamlength.md)|Sets the length of the specified parameter stored in the buffer.|
47
+
|[SetParamStatus](../../data/oledb/cdynamicparameteraccessor-setparamstatus.md)|Sets the status of the specified parameter stored in the buffer.|
48
+
|[SetParamString](../../data/oledb/cdynamicparameteraccessor-setparamstring.md)|Sets the string data of the specified parameter stored in the buffer.|
49
+
50
+
## Remarks
51
+
52
+
The provider must support `ICommandWithParameters` for the consumer to use this class.
53
+
54
+
The parameter information is stored in a buffer created and managed by this class. Obtain parameter data from the buffer by using [GetParam](../../data/oledb/cdynamicparameteraccessor-getparam.md) and [GetParamType](../../data/oledb/cdynamicparameteraccessor-getparamtype.md).
55
+
56
+
For an example demonstrating how to use this class to execute a SQL Server stored procedure and get the output parameter values, see the [DynamicConsumer](https://github.com/Microsoft/VCSamples/tree/master/VC2008Samples/ATL/OLEDB/Consumer/DynamicConsumer) sample code in the [Microsoft VCSamples](https://github.com/Microsoft/VCSamples) repository on GitHub.
57
+
58
+
## Requirements
59
+
60
+
**Header**: atldbcli.h
61
+
62
+
## See also
63
+
64
+
[OLE DB Consumer Templates](../../data/oledb/ole-db-consumer-templates-cpp.md)
65
+
[OLE DB Consumer Templates Reference](../../data/oledb/ole-db-consumer-templates-reference.md)
0 commit comments