Developers community number 1 connection string reference

Connection strings for Textfile

Community Forums
Find solutions and post questions regarding connection string related issues.

Microsoft Jet OLE DB 4.0

Type OLE DB Provider
Usage Provider=Microsoft.Jet.OLEDB.4.0
Manufacturer Microsoft

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:<br/> HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Jet \ 4.0 \ Engines \ Text <br/> "Format" = "TabDelimited"<br/> or<br/> "Format" = "Delimited(;)"<br/>

How to Use JET in 64 bit environments >>

 
 

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!<br/>The quota " in the string needs to be escaped using your language specific escape syntax.<br/> c#, c++&nbsp;&nbsp;&nbsp;\"<br/> VB6, VBScript&nbsp;&nbsp;&nbsp;""<br/> xml (web.config etc)&nbsp;&nbsp;&nbsp;&amp;quot;<br/> or maybe use a single quota '.

More info on using the schema.ini file

 
 

.NET Framework Data Provider for OLE DB

Type .NET Framework Wrapper Class Library
Usage System.Data.OleDb.OleDbConnection
Manufacturer Microsoft

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

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
Manufacturer Microsoft

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 © 2012 ConnectionStrings.com   |   All Rights Reserved   |   Powered by CSAS   |   Send feedback, articles, requests and more connection strings here.