Skip to content

Latest commit

 

History

History
45 lines (30 loc) · 2.42 KB

File metadata and controls

45 lines (30 loc) · 2.42 KB
title Metadata Discovery | Microsoft Docs
description Metadata discovery in OLE DB Driver for SQL Server
ms.custom
ms.date 06/12/2018
ms.prod sql
ms.prod_service database-engine, sql-database, sql-data-warehouse, pdw
ms.reviewer
ms.technology connectivity
ms.topic reference
author pmasl
ms.author pelopes

Metadata Discovery

[!INCLUDEappliesto-ss-asdb-asdw-pdw-md]

[!INCLUDEDriver_OLEDB_Download]

The metadata discovery improvement in [!INCLUDEssSQL11] allows OLE DB Driver for SQL Server 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 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 OLE DB Driver for SQL Server but connect to a server version earlier than [!INCLUDEssSQL11], metadata discovery functionality will correspond to the version of the server.

Remarks

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 OLE DB Driver for SQL Server is possible because of the addition of two stored procedures in [!INCLUDEssSQL11]:

  • sp_describe_first_result_set

  • sp_describe_undeclared_parameters

See Also

OLE DB Driver for SQL Server Features