Developers community number 1 connection string reference

Connection strings for Textfile

Providers to use when connecting to Textfile
Finding this site useful?

-Say "Thanks" to Benjamin Nelson and the other contributing developers!

-Thank you! »

Microsoft Jet OLE DB 4.0

Type:    OLE DB Provider
Usage:  Provider=Microsoft.Jet.OLEDB.4.0
Manufacturer:  Microsoft
Customize string example values »
Delimited columns
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\txtFilesFolder\;Extended Properties="text;HDR=Yes;FMT=Delimited";
The delimiter can be specified in the registry at the following location:
HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Jet \ 4.0 \ Engines \ Text
"Format" = "TabDelimited"
or
"Format" = "Delimited(;)"
Fixed length columns
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\txtFilesFolder\;Extended Properties="text;HDR=Yes;FMT=Fixed";
"HDR=Yes;" indicates that the first row contains columnnames, not data. "HDR=No;" indicates the opposite.

To specify each columns length use the Schema.ini file. See description below.

Important note!
The quota " in the string needs to be escaped using your language specific escape syntax.
c#, c++   \"
VB6, VBScript   ""
xml (web.config etc)   "
or maybe use a single quota '.

.NET Framework Data Provider for OLE DB

Type:    .NET Framework Wrapper Class Library
Usage:  System.Data.OleDb.OleDbConnection
Customize string example values »
Bridging to Jet OLE DB 4.0
This is just one connection string sample for the wrapping OleDbConnection class that calls the underlying OLEDB provider. See respective OLE DB provider for more connection strings to use with this class.
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\txtFilesFolder\;Extended Properties="text;HDR=Yes;FMT=Delimited";
 

Microsoft Text ODBC Driver

Type:    ODBC Driver
Usage:  Driver={Microsoft Text Driver (*.txt; *.csv)}
Manufacturer:  Microsoft
More info about this driver »
Customize string example values »
Standard
Driver={Microsoft Text Driver (*.txt; *.csv)};Dbq=c:\txtFilesFolder\;Extensions=asc,csv,tab,txt;
 

.NET Framework Data Provider for ODBC

Type:    .NET Framework Wrapper Class Library
Usage:  System.Data.Odbc.OdbcConnection
Customize string example values »
Bridging to Microsoft Text ODBC Driver
This is just one connection string sample for the wrapping OdbcConnection class that calls the underlying ODBC Driver. See respective ODBC driver for more connection strings to use with this class.
Driver={Microsoft Text Driver (*.txt; *.csv)};Dbq=c:\txtFilesFolder\;Extensions=asc,csv,tab,txt;
 
Copyright © 2010 ConnectionStrings.com   |   All Rights Reserved   |   Powered by CSAS   |   Send feedback, articles, requests and more connection strings here.