ADO.NET Provider for CSV

Build 24.0.9060

FMT

The format to be used to parse all text files.

Data Type

string

Default Value

"CsvDelimited"

Remarks

When this connection property is set, the provider will parse all text files in the URI according to the specified file format. The text file format can also be specified in ExtendedProperties, as with the Microsoft Jet OLE DB 4.0 ExtendedProperties for text files. The format specified in ExtendedProperties overrides the format set as a stand-alone connection property. The Format property in Schema.ini overrides the file format set in the connection string.

The FMT can be set to one of the following values:

  • CsvDelimited: The provider separates each field by commas.
  • TabDelimited: The provider separates each field by tabs.
  • FixedLength: The provider counts a specified number of characters to separate each field. If this format is specified, the width of each column must be defined in Schema.ini.

The following connection string parses all text files in the folder specified in the URI as tab-delimited values with headers:

InitiateOAuth=GETANDREFRESH;URI=C:\mytsv;FMT=TabDelimited

If the property is set to anything other than the values specified above, the literal character of the specified input will be read as the delimiter, for example:

InitiateOAuth=GETANDREFRESH;URI=C:\mypipdelimitedfile;FMT=||

This property supports hexadecimal delimiters. The provider treats any value starting with '0x' (Ex: FMT=0x01) as a hexadecimal, as opposed to a string literal, delimiter.

Note that hexadecimal delimiters have no escape mechanism.

Copyright (c) 2024 CData Software, Inc. - All rights reserved.
Build 24.0.9060