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/relational-databases/native-client-odbc-api/odbc-api-implementation-details.md
+11-7Lines changed: 11 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,17 @@
1
1
---
2
-
title: ODBC API Implementation Details
3
-
description: Learn how the ODBC API processes function calls, manages handles, interacts with drivers, and controls diagnostics in SQL Server and Azure SQL products.
4
-
author: your-alias-here
5
-
ms.author: your-msauthor
6
-
ms.reviewer: maghan
2
+
title: "ODBC API Implementation Details"
3
+
description: "ODBC API Implementation Details"
4
+
author: markingmyname
5
+
ms.author: maghan
7
6
ms.date: 01/26/2026
8
7
ms.service: sql
9
-
ms.subservice: connectivity
10
-
ms.topic: reference
8
+
ms.subservice: native-client
9
+
ms.topic: "reference"
10
+
helpviewer_keywords:
11
+
- "ODBC, functions"
12
+
- "SQL Server Native Client ODBC driver, SQL Server-specific behaviors"
Copy file name to clipboardExpand all lines: docs/relational-databases/native-client-odbc-date-time/odbc-api-support-for-enhanced-date-and-time-features.md
+70-56Lines changed: 70 additions & 56 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,65 +3,79 @@ title: "ODBC API for Date Time"
3
3
description: "ODBC API Support for Enhanced Date and Time Features"
4
4
author: markingmyname
5
5
ms.author: maghan
6
-
ms.date: 12/18/2019
6
+
ms.date: 01/26/2026
7
7
ms.service: sql
8
8
ms.subservice: native-client
9
9
ms.topic: "reference"
10
10
helpviewer_keywords:
11
11
- "date/time [ODBC], API support"
12
12
---
13
-
# ODBC API Support for Enhanced Date and Time Features
14
-
[!INCLUDE[SQL Server Azure SQL Database Synapse Analytics PDW](../../includes/applies-to-version/sql-asdb-asdbmi-asa-pdw.md)]
15
-
16
-
The following ODBC APIs support enhanced date and time functionality:
[Date and Time Improvements (ODBC)](../../relational-databases/native-client-odbc-date-time/date-and-time-improvements-odbc.md)
66
-
67
-
13
+
14
+
## ODBC API support for enhanced date and time features
15
+
16
+
[!INCLUDE [SQL Server Azure SQL Database Synapse Analytics PDW](../../includes/applies-to-version/sql-asdb-asdbmi-asa-pdw.md)]
17
+
18
+
Enhanced date and time types (such as `date`, `time`, `datetime2`, and `datetimeoffset`) require the ODBC driver to support richer metadata, extended precision, and more flexible binding semantics.
19
+
The following ODBC and bulk copy APIs are grouped according to how they contribute to discovery, binding, retrieval, descriptor management, and high‑volume ingestion of enhanced date and time values.
20
+
21
+
## Schema & Metadata Discovery (Date/Time Types)
22
+
23
+
These APIs help applications determine supported date/time types, column metadata, and parameter characteristics.
24
+
25
+
| Function | Purpose |
26
+
|----------|---------|
27
+
|[SQLColumns](../../relational-databases/native-client-odbc-api/sqlcolumns.md)| Retrieves metadata for columns, including enhanced date/time types. |
28
+
|[SQLColAttribute](../../relational-databases/native-client-odbc-api/sqlcolattribute.md)| Returns column attributes such as type, precision, and scale for date/time fields. |
29
+
|[SQLDescribeCol](../../relational-databases/native-client-odbc-api/sqldescribecol.md)| Provides column descriptions, including date/time type details. |
30
+
|[SQLDescribeParam](../../relational-databases/native-client-odbc-api/sqldescribeparam.md)| Returns parameter metadata, including format and precision for date/time parameters. |
31
+
|[SQLGetTypeInfo](../../relational-databases/native-client-odbc-api/sqlgettypeinfo.md)| Lists supported SQL data types, including enhanced date/time categories. |
32
+
|[SQLProcedureColumns](../../relational-databases/native-client-odbc-api/sqlprocedurecolumns.md)| Retrieves metadata for stored procedure parameters, including those of date/time types. |
33
+
|[SQLSpecialColumns](../../relational-databases/native-client-odbc-api/sqlspecialcolumns.md)| Identifies special columns such as timestamps and versioning fields. |
34
+
35
+
## Binding & Parameter Support for Date/Time Types
36
+
37
+
These functions bind application variables and parameters to date and time values.
38
+
39
+
| Function | Purpose |
40
+
|----------|---------|
41
+
|[SQLBindCol](../../relational-databases/native-client-odbc-api/sqlbindcol.md)| Binds application buffers to result columns containing date/time values. |
42
+
|[SQLBindParameter](../../relational-databases/native-client-odbc-api/sqlbindparameter.md)| Binds date/time parameters for prepared or direct statements. |
43
+
|[SQLPutData](../../relational-databases/native-client-odbc-api/sqlputdata.md)| Streams large or variable‑length date/time data during execution. |
44
+
45
+
## Fetching & Retrieving Date/Time Values
46
+
47
+
These APIs retrieve enhanced date/time values from executed statements.
|[SQLFetchScroll](../../relational-databases/native-client-odbc-api/sqlfetchscroll.md)| Fetches rows using scrollable cursors with date/time columns. |
53
+
|[SQLGetData](../../relational-databases/native-client-odbc-api/sqlgetdata.md)| Retrieves date/time column values in flexible buffer formats. |
54
+
55
+
## Descriptor & Attribute Management for Date/Time Types
56
+
57
+
Enhanced date/time values require accurate descriptor fields for precision, scale, and storage layout.
58
+
59
+
| Function | Purpose |
60
+
|----------|---------|
61
+
|[SQLGetDescField](../../relational-databases/native-client-odbc-api/sqlgetdescfield.md)| Retrieves descriptor metadata for date/time fields. |
62
+
|[SQLGetDescRec](../../relational-databases/native-client-odbc-api/sqlgetdescrec.md)| Retrieves a complete descriptor record, including type/precision. |
63
+
|[SQLSetDescField](../../relational-databases/native-client-odbc-api/sqlsetdescfield.md)| Sets descriptor fields to correctly represent date/time values. |
64
+
|[SQLSetDescRec](../../relational-databases/native-client-odbc-api/sqlsetdescrec.md)| Sets a complete descriptor record for buffers that store date/time information. |
65
+
66
+
## Bulk Copy (BCP) Support for Date/Time Types
67
+
68
+
Bulk copy operations allow high‑volume ingestion and extraction of enhanced date/time values.
|[bcp_colfmt](../../relational-databases/native-client-odbc-extensions-bulk-copy-functions/bcp-colfmt.md)| Defines column formats for date/time values during BCP export/import. |
74
+
|[bcp_getcolfmt](../../relational-databases/native-client-odbc-extensions-bulk-copy-functions/bcp-getcolfmt.md)| Retrieves format information for columns containing date/time types. |
75
+
|[bcp_gettypename](../../relational-databases/native-client-odbc-extensions-bulk-copy-functions/bcp-gettypename.md)| Returns SQL Server type names, including enhanced date/time types. |
76
+
|[bcp_setcolfmt](../../relational-databases/native-client-odbc-extensions-bulk-copy-functions/bcp-setcolfmt.md)| Sets format definitions for bulk operations involving date/time types. |
77
+
78
+
## Related content
79
+
80
+
-[Date and Time Improvements (ODBC)](../../relational-databases/native-client-odbc-date-time/date-and-time-improvements-odbc.md)
Copy file name to clipboardExpand all lines: docs/relational-databases/native-client-odbc-table-valued-parameters/odbc-table-valued-parameter-api-summary.md
+77-46Lines changed: 77 additions & 46 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,56 +3,87 @@ title: "ODBC Table-Valued Parameter API Summary"
3
3
description: "ODBC Table-Valued Parameter API Summary"
4
4
author: markingmyname
5
5
ms.author: maghan
6
-
ms.date: "03/06/2017"
6
+
ms.date: 01/26/2026
7
7
ms.service: sql
8
8
ms.subservice: native-client
9
9
ms.topic: "reference"
10
10
helpviewer_keywords:
11
11
- "ODBC, API support for table-valued parameters"
12
12
- "table-valued parameters (ODBC), API support"
13
13
---
14
-
# ODBC Table-Valued Parameter API Summary
15
-
[!INCLUDE[SQL Server Azure SQL Database Synapse Analytics PDW](../../includes/applies-to-version/sql-asdb-asdbmi-asa-pdw.md)]
16
-
17
-
This topic lists the ODBC functions that were enhanced to support table-valued parameters.
[!INCLUDE [SQL Server Azure SQL Database Synapse Analytics PDW](../../includes/applies-to-version/sql-asdb-asdbmi-asa-pdw.md)]
18
+
19
+
ODBC supports table-valued parameters (TVPs) through enhancements to several existing API functions. These functions work together to describe TVP schemas, bind and transmit row sets, fetch metadata, and manage descriptor records.
20
+
The following sections organize the relevant ODBC functions into logical groups to help you understand how each part of the TVP pipeline operates.
21
+
22
+
---
23
+
24
+
# TVP schema discovery and metadata functions
25
+
26
+
These functions help an application discover the structure of table-valued parameters, including column metadata, parameter definitions, and available SQL data types.
27
+
28
+
| Function | Purpose |
29
+
|----------|----------|
30
+
|[SQLColumns](../../relational-databases/native-client-odbc-api/sqlcolumns.md)| Retrieves column metadata for a table‑valued parameter or table type. |
31
+
|[SQLDescribeParam](../../relational-databases/native-client-odbc-api/sqldescribeparam.md)| Returns metadata for a TVP parameter, including type, precision, and scale. |
32
+
|[SQLGetTypeInfo](../../relational-databases/native-client-odbc-api/sqlgettypeinfo.md)| Retrieves the SQL data types supported by the driver for table‑valued parameter columns. |
33
+
|[SQLPrimaryKeys](../../relational-databases/native-client-odbc-api/sqlprimarykeys.md)| Provides information about key columns in table types used with TVPs. |
34
+
|[SQLProcedureColumns](../../relational-databases/native-client-odbc-api/sqlprocedurecolumns.md)| Retrieves metadata for TVP-related stored procedure parameters. |
35
+
|[SQLTables](../../relational-databases/native-client-odbc-api/sqltables.md)| Lists tables and table types available as sources for TVP declarations. |
36
+
37
+
---
38
+
39
+
# TVP parameter binding and data transmission
40
+
41
+
These functions handle binding structured data to parameters, passing the data to the server, or streaming rows during execution.
42
+
43
+
| Function | Purpose |
44
+
|----------|---------|
45
+
|[SQLBindParameter](../../relational-databases/native-client-odbc-api/sqlbindparameter.md)| Binds a table-valued parameter to an application buffer or rowset. |
46
+
|[SQLParamData](../../relational-databases/native-client-odbc-api/sqlparamdata.md)| Retrieves the next part of a streamed TVP parameter when using data-at-execution. |
47
+
|[SQLPutData](../../relational-databases/native-client-odbc-api/sqlputdata.md)| Sends TVP data in chunks during data-at-execution operations. |
48
+
49
+
---
50
+
51
+
# Statement execution for TVPs
52
+
53
+
These functions execute SQL statements that reference TVPs and manage the execution lifecycle.
54
+
55
+
| Function | Purpose |
56
+
|----------|---------|
57
+
|[SQLExecDirect](../../relational-databases/native-client-odbc-api/sqlexecdirect.md)| Executes a SQL statement that uses TVPs without preparing it first. |
58
+
|[SQLExecute](../../relational-databases/native-client-odbc-api/sqlexecute.md)| Executes a previously prepared SQL statement that includes TVP parameters. |
59
+
60
+
---
61
+
62
+
# Descriptor and attribute management for TVPs
63
+
64
+
Use these functions to manage descriptor fields and statement attributes required to describe rowsets and structured parameters correctly.
65
+
66
+
| Function | Purpose |
67
+
|----------|---------|
68
+
|[SQLGetDescField](../../relational-databases/native-client-odbc-api/sqlgetdescfield.md)| Retrieves descriptor metadata for TVP columns or rowsets. |
69
+
|[SQLGetDescRec](../../relational-databases/native-databases/native-client-odbc-api/sqlgetdescrec.md)| Retrieves a complete descriptor record for a TVP. |
70
+
|[SQLSetDescField](../../relational-databases/native-client-odbc-api/sqlsetdescfield.md)| Sets descriptor metadata for TVP columns or rowsets. |
71
+
|[SQLSetDescRec](../../relational-databases/native-client-odbc-api/sqlsetdescrec.md)| Sets a full descriptor record for structured TVP data. |
|[SQLSetStmtAttr](../../relational-databases/native-client-odbc-api/sqlsetstmtattr.md)| Sets statement attributes such as rowset sizes or streaming flags for TVP operations. |
74
+
75
+
---
76
+
77
+
# Diagnostics and error handling for TVPs
78
+
79
+
Use these functions to help your applications detect errors, warnings, or status messages during TVP binding and execution.
80
+
81
+
| Function | Purpose |
82
+
|----------|---------|
83
+
|[SQLGetDiagField](../../relational-databases/native-client-odbc-api/sqlgetdiagfield.md)| Retrieves diagnostic information generated during TVP processing. |
0 commit comments