IBCPSession::BCPWriteFmt (OLE DB)

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 format file produced by the BCPWriteFmt method is supported only by versions of the bcp utility distributed with SQL Server version 7.0 or later.

Arguments

  • pwszFormatFile[in]
    The path and file name of the file containing the format values for the data file.

Return Code Values

  • S_OK
    The method succeeded.
  • E_FAIL
    A provider-specific error occurred; for detailed information, use the ISQLServerErrorInfo interface.
  • E_OUTOFMEMORY
    Out-of-memory error.
  • E_UNEXPECTED
    The call to the method was unexpected. For example, the IBCPSession::BCPInit method was not called before calling this method.

참고 항목

개념

Performing Bulk Copy Operations

관련 자료

IBCPSession (OLE DB)

도움말 및 정보

SQL Server 2005 지원 받기