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
**\[**`bindtype`**]** is one of the following case-insensitive strings:
57
+
-**\[***bindtype***]** is one of the following case-insensitive strings:
58
58
59
-
-**\[db_column]** binds each of the member variables to a column in a rowset.
59
+
-**\[db_column]** binds each of the member variables to a column in a rowset.
60
60
61
-
-**\[bindto]** (same as **\[db_column]**).
61
+
-**\[bindto]** (same as **\[db_column]**).
62
62
63
-
-**\[in]** binds member variables as input parameters.
63
+
-**\[in]** binds member variables as input parameters.
64
64
65
-
-**\[out]** binds member variables as output parameters.
65
+
-**\[out]** binds member variables as output parameters.
66
66
67
-
-**\[in,out]** binds member variables as input/output parameters.
67
+
-**\[in,out]** binds member variables as input/output parameters.
68
68
69
-
*SzVarX* resolves to a member variable within the current scope.
69
+
-*szVarX*, *nVarX* resolves to a member variable within the current scope.
70
70
71
-
**)** marks the end of the data binding block.
71
+
-**)** marks the end of the data binding block.
72
72
73
-
If the command string contains one or more specifiers such as \[in], \[out], or \[in/out], **db_command** builds a parameter map.
73
+
If the command string contains one or more specifiers such as \[in], \[out], or \[in/out], **db_command** builds a parameter map.
74
74
75
-
If the command string contains one or more parameters such as \[db_column] or \[bindto], **db_command** generates a rowset and an accessor map to service these bound variables. See [db_accessor](../windows/db-accessor.md) for more information.
75
+
If the command string contains one or more parameters such as \[db_column] or \[bindto], **db_command** generates a rowset and an accessor map to service these bound variables. See [db_accessor](../windows/db-accessor.md) for more information.
76
76
77
77
> [!NOTE]
78
78
> \[*bindtype*] syntax and the *bindings* parameter are not valid when using **db_command** at the class level.
@@ -107,7 +107,7 @@ Allows you to separate the binding parameters from the OLE DB command.
107
107
108
108
If you specify a value for *bindings*, **db_command** will parse the associated value and will not parse the \[*bindtype*] parameter. This usage allows you to use OLE DB provider syntax. To disable parsing, without binding parameters, specify **Bindings=""**.
109
109
110
-
If you do not specify a value for *bindings*, **db_command** will parse the binding parameter block, looking for '**(**', followed by **\[**`bindtype`**]** in brackets, followed by one or more previously declared C++ member variables, followed by '**)**'. All text between the parentheses will be stripped from the resulting command, and these parameters will be used to construct column and parameter bindings for this command.
110
+
If you do not specify a value for *bindings*, **db_command** will parse the binding parameter block, looking for '**(**', followed by **\[**_bindtype_**]** in brackets, followed by one or more previously declared C++ member variables, followed by '**)**'. All text between the parentheses will be stripped from the resulting command, and these parameters will be used to construct column and parameter bindings for this command.
111
111
112
112
*bulk_fetch* (optional)
113
113
An integer value that specifies the number of rows to fetch.
@@ -121,7 +121,7 @@ If *bulk_fetch* is less than one, `SetRows` will return zero.
121
121
## Remarks
122
122
**db_command** creates a [CCommand](../data/oledb/ccommand-class.md) object, which is used by an OLE DB consumer to execute a command.
123
123
124
-
You can use **db_command** with either class or function scope; the main difference is the scope of the `CCommand` object. With function scope, data such as bindings terminate at function end. Both class and function scope usages involve the OLE DB Consumer Template class **CCommand<>**, but the template arguments differ for the function and class cases. In the function case, bindings will be made to an **Accessor** that comprises local variables, while the class usage will infer a `CAccessor`-derived class as the argument. When used as a class attribute, **db_command** works in conjunction with **db_column**.
124
+
You can use **db_command** with either class or function scope; the main difference is the scope of the `CCommand` object. With function scope, data such as bindings terminate at function end. Both class and function scope usages involve the OLE DB Consumer Template class **CCommand\<>**, but the template arguments differ for the function and class cases. In the function case, bindings will be made to an **Accessor** that comprises local variables, while the class usage will infer a `CAccessor`-derived class as the argument. When used as a class attribute, **db_command** works in conjunction with **db_column**.
125
125
126
126
**db_command** can be used to execute commands that do not return a result set.
0 commit comments