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
Copy file name to clipboardExpand all lines: docs/odbc/reference/develop-app/deferred-buffers.md
+13-4Lines changed: 13 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ title: "Deferred Buffers"
3
3
description: "Deferred Buffers"
4
4
author: David-Engel
5
5
ms.author: davidengel
6
-
ms.date: "01/19/2017"
6
+
ms.date: "01/27/2026"
7
7
ms.service: sql
8
8
ms.subservice: connectivity
9
9
ms.topic: concept-article
@@ -12,13 +12,22 @@ helpviewer_keywords:
12
12
- "deferred buffers [ODBC]"
13
13
---
14
14
# Deferred Buffers
15
-
A *deferred buffer* is one whose value is used at some time *after* it is specified in a function call. For example, **SQLBindParameter** is used to associate, or *bind,* a data buffer with a parameter in a SQL statement. The application specifies the number of the parameter and passes the address, byte length, and type of the buffer. The driver saves this information but does not examine the contents of the buffer. Later, when the application executes the statement, the driver retrieves the information and uses it to retrieve the parameter data and send it to the data source. Therefore, the input of data in the buffer is deferred. Because deferred buffers are specified in one function and used in another, it is an application programming error to free a deferred buffer while the driver still expects it to exist; for more information, see [Allocating and Freeing Buffers](../../../odbc/reference/develop-app/allocating-and-freeing-buffers.md), later in this section.
15
+
16
+
A *deferred buffer* is one whose value is used at some time *after* you specify it in a function call. For example, you use **SQLBindParameter** to associate, or *bind,* a data buffer with a parameter in a SQL statement. You specify the number of the parameter and pass the address, byte length, and type of the buffer. The driver saves this information but doesn't examine the contents of the buffer. Later, when you execute the statement, the driver retrieves the information and uses it to retrieve the parameter data and send it to the data source. Therefore, the input of data in the buffer is deferred. Because deferred buffers are specified in one function and used in another, it's an application programming error to free a deferred buffer while the driver still expects it to exist. For more information, see [Allocating and Freeing Buffers](../../../odbc/reference/develop-app/allocating-and-freeing-buffers.md), later in this section.
16
17
17
-
Both input and output buffers can be deferred. The following table summarizes the uses of deferred buffers. Note that deferred buffers bound to result set columns are specified with **SQLBindCol**, and deferred buffers bound to SQL statement parameters are specified with **SQLBindParameter**.
18
+
## Deferred buffer types
19
+
20
+
Both input and output buffers can be deferred. The following table summarizes the uses of deferred buffers. Note that deferred buffers bound to result set columns are specified with **SQLBindCol**, and deferred buffers bound to SQL statement parameters are specified with **SQLBindParameter**.
Copy file name to clipboardExpand all lines: docs/odbc/reference/syntax/sqlexecdirect-function.md
+14-12Lines changed: 14 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ title: "SQLExecDirect Function"
3
3
description: "SQLExecDirect Function"
4
4
author: David-Engel
5
5
ms.author: davidengel
6
-
ms.date: "01/19/2017"
6
+
ms.date: "01/27/2026"
7
7
ms.service: sql
8
8
ms.subservice: connectivity
9
9
ms.topic: reference
@@ -108,26 +108,28 @@ SQLRETURN SQLExecDirect(
108
108
|IM018|**SQLCompleteAsync** has not been called to complete the previous asynchronous operation on this handle.|If the previous function call on the handle returns SQL_STILL_EXECUTING and if notification mode is enabled, **SQLCompleteAsync** must be called on the handle to do post-processing and complete the operation.|
109
109
110
110
## Comments
111
-
The application calls **SQLExecDirect** to send a SQL statement to the data source. For more information about direct execution, see [Direct Execution](../../../odbc/reference/develop-app/direct-execution-odbc.md). The driver modifies the statement to use the form of SQL used by the data source and then submits it to the data source. In particular, the driver modifies the escape sequences used to define certain features in SQL. For the syntax of escape sequences, see [Escape Sequences in ODBC](../../../odbc/reference/develop-app/escape-sequences-in-odbc.md).
111
+
You call **SQLExecDirect** to send a SQL statement to the data source. For more information about direct execution, see [Direct Execution](../../../odbc/reference/develop-app/direct-execution-odbc.md). The driver modifies the statement to use the form of SQL that the data source uses and then submits it to the data source. In particular, the driver modifies the escape sequences used to define certain features in SQL. For the syntax of escape sequences, see [Escape Sequences in ODBC](../../../odbc/reference/develop-app/escape-sequences-in-odbc.md).
112
112
113
-
The application can include one or more parameter markers in the SQL statement. To include a parameter marker, the application embeds a question mark (?) into the SQL statement at the appropriate position. For information about parameters, see [Statement Parameters](../../../odbc/reference/develop-app/statement-parameters.md).
113
+
You can include one or more parameter markers in the SQL statement. To include a parameter marker, embed a question mark (?) into the SQL statement at the appropriate position. For information about parameters, see [Statement Parameters](../../../odbc/reference/develop-app/statement-parameters.md).
114
114
115
-
If the SQL statement is a **SELECT** statement and if the application called **SQLSetCursorName** to associate a cursor with a statement, then the driver uses the specified cursor. Otherwise, the driver generates a cursor name.
115
+
After a successful call to **SQLExecDirect** that returns a result set (such as from a **SELECT** statement), the statement handle is positioned before the first row of the result set. You can then call **SQLFetch** or **SQLFetchScroll** to retrieve rows, or call **SQLRowCount** to determine the number of affected rows for **INSERT**, **UPDATE**, or **DELETE** statements.
116
116
117
-
If the data source is in manual-commit mode (requiring explicit transaction initiation) and a transaction has not already been initiated, the driver initiates a transaction before it sends the SQL statement. For more information, see [Manual-Commit Mode](../../../odbc/reference/develop-app/manual-commit-mode.md).
117
+
If the SQL statement is a **SELECT** statement and you called **SQLSetCursorName** to associate a cursor with a statement, the driver uses the specified cursor. Otherwise, the driver generates a cursor name.
118
118
119
-
If an application uses **SQLExecDirect** to submit a **COMMIT** or **ROLLBACK** statement, it will not be interoperable between DBMS products. To commit or roll back a transaction, an application calls **SQLEndTran**.
119
+
If the data source is in manual-commit mode (requiring explicit transaction initiation) and a transaction hasn't already been initiated, the driver initiates a transaction before it sends the SQL statement. For more information, see [Manual-Commit Mode](../../../odbc/reference/develop-app/manual-commit-mode.md).
120
120
121
-
If **SQLExecDirect** encounters a data-at-execution parameter, it returns SQL_NEED_DATA. The application sends the data using **SQLParamData** and **SQLPutData**. See [SQLBindParameter](../../../odbc/reference/syntax/sqlbindparameter-function.md), [SQLParamData](../../../odbc/reference/syntax/sqlparamdata-function.md), [SQLPutData](../../../odbc/reference/syntax/sqlputdata-function.md), and [Sending Long Data](../../../odbc/reference/develop-app/sending-long-data.md).
121
+
If you use **SQLExecDirect** to submit a **COMMIT** or **ROLLBACK** statement, it won't be interoperable between DBMS products. To commit or roll back a transaction, call **SQLEndTran**.
122
122
123
-
If **SQLExecDirect** executes a searched update, insert, or delete statement that does not affect any rows at the data source, the call to **SQLExecDirect** returns SQL_NO_DATA.
123
+
If **SQLExecDirect** encounters a data-at-execution parameter, it returns SQL_NEED_DATA. Send the data using **SQLParamData** and **SQLPutData**. See [SQLBindParameter](../../../odbc/reference/syntax/sqlbindparameter-function.md), [SQLParamData](../../../odbc/reference/syntax/sqlparamdata-function.md), [SQLPutData](../../../odbc/reference/syntax/sqlputdata-function.md), and [Sending Long Data](../../../odbc/reference/develop-app/sending-long-data.md).
124
124
125
-
If the value of the SQL_ATTR_PARAMSET_SIZE statement attribute is greater than 1 and the SQL statement contains at least one parameter marker, **SQLExecDirect** will execute the SQL statement once for each set of parameter values from the arrays pointed to by the *ParameterValuePointer* argument in the call to **SQLBindParameter**. For more information, see [Arrays of Parameter Values](../../../odbc/reference/develop-app/arrays-of-parameter-values.md).
125
+
If **SQLExecDirect** executes a searched update, insert, or delete statement that doesn't affect any rows at the data source, the call to **SQLExecDirect** returns SQL_NO_DATA.
126
126
127
-
If bookmarks are turned on and a query is executed that cannot support bookmarks, the driver should attempt to coerce the environment to one that supports bookmarks by changing an attribute value and returning SQLSTATE 01S02 (Option value changed). If the attribute cannot be changed, the driver should return SQLSTATE HY024 (Invalid attribute value).
127
+
If the value of the SQL_ATTR_PARAMSET_SIZE statement attribute is greater than 1 and the SQL statement contains at least one parameter marker, **SQLExecDirect** executes the SQL statement once for each set of parameter values from the arrays pointed to by the *ParameterValuePointer* argument in the call to **SQLBindParameter**. For more information, see [Arrays of Parameter Values](../../../odbc/reference/develop-app/arrays-of-parameter-values.md).
128
+
129
+
If bookmarks are turned on and a query is executed that can't support bookmarks, the driver should attempt to coerce the environment to one that supports bookmarks by changing an attribute value and returning SQLSTATE 01S02 (Option value changed). If the attribute can't be changed, the driver should return SQLSTATE HY024 (Invalid attribute value).
128
130
129
131
> [!NOTE]
130
-
> When using connection pooling, an application must not execute SQL statements that change the database or the context of the database, such as the **USE** _database_ statement in SQL Server, which changes the catalog used by a data source.
132
+
> When using connection pooling, don't execute SQL statements that change the database or the context of the database, such as the **USE** _database_ statement in SQL Server, which changes the catalog used by a data source.
131
133
132
134
## Code Example
133
135
See [SQLBindCol](../../../odbc/reference/syntax/sqlbindcol-function.md), [SQLGetData](../../../odbc/reference/syntax/sqlgetdata-function.md), and [Sample ODBC Program](../../../odbc/reference/sample-odbc-program.md).
@@ -150,6 +152,6 @@ SQLRETURN SQLExecDirect(
150
152
|Setting a cursor name|[SQLSetCursorName Function](../../../odbc/reference/syntax/sqlsetcursorname-function.md)|
151
153
|Setting a statement attribute|[SQLSetStmtAttr Function](../../../odbc/reference/syntax/sqlsetstmtattr-function.md)|
152
154
153
-
## See Also
155
+
## Related content
154
156
[ODBC API Reference](../../../odbc/reference/syntax/odbc-api-reference.md)
Copy file name to clipboardExpand all lines: docs/relational-databases/security/encryption/always-encrypted-enclaves-host-guardian-service-plan.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -130,7 +130,7 @@ These requirements include:
130
130
- If you're running [!INCLUDE [ssnoversion-md](../../../includes/ssnoversion-md.md)] in a VM:
131
131
- In Azure, use a [Generation 2 VM size](/azure/virtual-machines/generation-2#generation-2-vm-sizes) (recommended) or use a Generation 1 VM size with nested virtualization enabled. Check the [individual VM sizes documentation](/azure/virtual-machines/sizes) to determine which Generation 1 VM sizes support nested virtualization.
132
132
- On Hyper-V 2016 or later (outside of Azure), make sure your VM is a Generation 2 VM (recommended) or it's a Generation 1 VM with nested virtualization enabled. For more information, see [Should I create a generation 1 or 2 virtual machine in Hyper-V?](/windows-server/virtualization/hyper-v/plan/should-i-create-a-generation-1-or-2-virtual-machine-in-hyper-v) and [Configure nested virtualization](/virtualization/hyper-v-on-windows/user-guide/nested-virtualization#configure-nested-virtualization).
133
-
- On VMware vSphere 6.7 or later, enable virtualization-based security support for the VM as described in the [VMware documentation](https://docs.vmware.com/en/VMware-vSphere/6.7/com.vmware.vsphere.vm_admin.doc/GUID-C2E78F3E-9DE2-44DB-9B0A-11440800AADD.html).
133
+
- On VMware vSphere 6.7 or later, enable virtualization-based security support for the VM. Check your VMware documentation for instructions on enabling VBS and nested virtualization for your specific vSphere version.
134
134
- Other hypervisors and public clouds may support nested virtualization capabilities that enable Always Encrypted with VBS Enclaves as well. Check your virtualization solution's documentation for compatibility and configuration instructions.
135
135
- If you plan to use TPM attestation, you'll need a TPM 2.0 rev 1.16 chip ready for use in the server. At this time, HGS attestation doesn't work with TPM 2.0 rev 1.38 chips. Additionally, the TPM must have a valid Endorsement Key Certificate.
0 commit comments