Skip to content

Latest commit

 

History

History
69 lines (41 loc) · 4.25 KB

metadata-discovery.md

File metadata and controls

69 lines (41 loc) · 4.25 KB
title description author ms.author ms.date ms.service ms.subservice ms.topic
Metadata Discovery
Metadata Discovery in SQL Server Native Client
markingmyname
maghan
03/14/2017
sql
native-client
reference

Metadata Discovery in SQL Server Native Client

[!INCLUDE SQL Server]

Important

[!INCLUDEsnac-removed-oledb-and-odbc]

The metadata discovery improvement in [!INCLUDEssSQL11] allows [!INCLUDEssNoVersion] Native Client applications to ensure that column or parameter metadata returned from the execution of a query is identical to or compatible with the metadata format you specified before you executed the query. You will receive an error if the metadata returned after query execution is not compatible with the metadata format you specified before query execution.

In bcp and ODBC functions, and IBCPSession and IBCPSession2 interfaces, you can now specify a delayed read (delayed metadata discovery) to avoid metadata discovery for query out operations. This improves performance and eliminates metadata discovery failures.

If you develop an application using [!INCLUDEssNoVersion] Native Client in [!INCLUDEssSQL11] but connect to a server version earlier than [!INCLUDEssSQL11], metadata discovery functionality will correspond to the version of the server.

Remarks

The following bcp functions have been enhanced in [!INCLUDEssSQL11] to provide improved metadata discovery:

You will also see a performance improvement when specifying metadata format using bcp_setbulkmode.

bcp_control has a new eOption to control the behavior of bcp_readfmt: BCPDELAYREADFMT.

The following ODBC functions have been enhanced in [!INCLUDEssSQL11] to provide improved metadata discovery:

The following OLE DB member functions have been enhanced in [!INCLUDEssSQL11] to provide improved metadata discovery:

  • IColumnsInfo::GetColumnInfo

  • IColumnsRowset::GetColumnsRowset

  • ICommandWithParameters::GetParameterInfo (see ICommandWithParameters for more information)

You will also see a performance improvement when specifying metadata format using IBCPSession::BCPSetBulkMode

The improved metadata discovery in [!INCLUDEssNoVersion] Native Client is possible because of the addition of two stored procedures in [!INCLUDEssSQL11]:

  • sp_describe_first_result_set

  • sp_describe_undeclared_parameters

See Also

SQL Server Native Client Features