Linking to Text files
To link to text files, create the schema.ini file discussed below and enter the following connection strings into the ADO connection string box.
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Directory containing the text files;Extended Properties="text;HDR=No;FMT=FixedLength";
Directory containing the text files is the path where the text files are stored. The directory will be treated as the database and the text files contained in the directory will be treated as the tables.
HDR=No indicates that the first row contains data not a header row. If your first row has column descriptions then change No to yes.
FMT=FixedLength indicates the format of the file. The valid settings are:
TabDelimited – fields are delimited by tabs
CSVDelimited – fields are delimited by commas
Delimited – fields are delimited by any character you choose all except the double quote (") are allowed, including blank). Format=Delimited(custom character)
FixedLength – all fields are of a fixed length
When using text files, the driver determines the format of the file by using a schema information file. This file is always called Schema.ini and must be in the same directory as the Data Source setting. SCHEMA.ini specifies the names of the text files and for each file, its file format, field names, widths, types and other information about the general file format. It is always required for accessing fixed-length text files.
The link below is to a web page that explains the layout and settings of the Schema.ini file in more detail.
https://msdn.microsoft.com/en-us/library/ms709353(v=vs.85).aspx