IBCPSession::BCPWriteFmt (OLE DB)
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.
Writes format information for each column to the format file.
HRESULT BCPWriteFmt( const wchar_t *pwszFormatFile);
The format file specifies the data format of a data file created by bulk copy. Calls to the IBCPSession::BCPColumns and IBCPSession::BCPColFmt methods define the format of the data file. The BCPWriteFmt method saves this definition in the file referenced by the pwszFormatFile argument.
The BCPWriteFmt method can save the format files in either xml or text format. This must be indicated by using the BCP_OPTION_XML control option with the IBCPSession::BCPControl method.
To load a saved format file, use the IBCPSession::BCPReadFmt method.
The path and file name of the file containing the format values for the data file.
The method succeeded.
A provider-specific error occurred; for detailed information, use the ISQLServerErrorInfo interface.
The call to the method was unexpected. For example, the IBCPSession::BCPInit method was not called before calling this method.