bcp_getcolfmt

 

System_CAPS_ICON_warning.jpg Warning

SQL Server Native Client (SNAC) is not supported beyond SQL Server 2012. Avoid using SNAC in new development work, and plan to modify applications that currently use it. The Microsoft ODBC Driver for SQL Server provides native connectivity from Windows to Microsoft SQL Server and Microsoft Azure SQL Database.

Used to find the column format property value.

  
RETCODE bcp_getcolfmt (  
        HDBC hdbc,  
        INT field,  
        INT property,  
        void* pValue,  
        INT cbvalue,  
        INT* pcbLen);  

hdbc
Is the bulk copy-enabled ODBC connection handle.

field
Is the column number for which the property is retrieved.

property
Is one of the property constants.

pValue
Is the pointer to the buffer from which to retrieve the property value.

cbValue
Is the length of the property buffer in bytes.

pcbLen
Pointer to length of the data that is being returned in the property buffer.

SUCCEED or FAIL.

Column format property values are listed in the bcp_setcolfmt topic. The column format property values are set by calling the bcp_setcolfmt function, and the bcp_getcolfmt function is used to find the column format property value.

Behavior changes may be observed when connecting to a SQL Server 2012 (or later) server computer, compared to earlier SQL Server versions. For more information, see Metadata Discovery.

The types used with the BCP_FMT_TYPE property for date/time types are as specified in Bulk Copy Changes for Enhanced Date and Time Types (OLE DB and ODBC).

For more information, see Date and Time Improvements (ODBC).

Bulk Copy Functions

Community Additions

ADD
Show: