Поделиться через


DataFileType Property

В будущей версии Microsoft SQL Server эта возможность будет удалена. Избегайте использования этой возможности в новых разработках и запланируйте изменение существующих приложений, в которых она применяется.

Microsoft SQL Server bulk-copy operations can copy to or read from files containing data in a number of formats. Use the DataFileType property to indicate the format type of the required file.

Синтаксис

object
.DataFileType [=value]

Parts

  • object
    An expression that evaluates to an object in the Applies To list.
  • value
    Specifies the data content of the target or source of the bulk-copy operation as described in Settings.

Data Type

Long, enumerated

Modifiable

Read/write

Prototype (C/C++)

HRESULT GetDataFileType(SQLDMO_DATAFILE_TYPE* pRetVal);
HRESULT SetDataFileType(SQLDMO_DATAFILE_TYPE NewValue);

Settings

Constant Value Description

SQLDMODataFile_/CommaDelimitedChar

1

Columns are delimited using a comma character. Each data row is delimited by a carriage return/line feed (CRLF) character pair.

SQLDMODataFile_Default

1

SQLDMODataFile_CommaDelimitedChar.

SQLDMODataFile_NativeFormat

4

The SQL Server bulk-copy native format.

SQLDMODataFile_/SpecialDelimitedChar

3

Delimiters are user-defined by the ColumnDelimiter and RowDelimiter properties of the BulkCopy object.

SQLDMODataFile_/TabDelimitedChar

2

Columns are delimited using a tab character. Each data row is delimited by a CRLF character pair.

SQLDMODataFile_/UseFormatFile

5

Bulk copy uses the file identified in the FormatFilePath property of the BulkCopy object.

Замечания

If DataFileType property is SQLDMODataFile_NativeFormat, use the Use6xCompatible property to specify SQL Server version compatibility.

Applies To:

BulkCopy Object

См. также

Справочник

ColumnDelimiter Property
FormatFilePath Property
RowDelimiter Property
Use6xCompatible Property

Справка и поддержка

Получение помощи по SQL Server 2005