Article ID: 149090 - View products that this article applies to.
This article was previously published under Q149090
Advanced: Requires expert coding, interoperability, and multiuser skills.
This article show you how to use a Schema.ini file and Data Access Objects (DAO) to programmatically open or link to a text file. A Schema.ini file contains the specifics on how data is formatted in a particular text file and is used by the Text ISAM driver to read and manipulate data.
This article assumes that you are familiar with Visual Basic for Applications and with creating Microsoft Access applications using the programming tools provided with Microsoft Access. For more information about Visual Basic for Applications, please refer to your version of the "Building Applications with Microsoft Access" manual.
To create a Schema.ini file and a fixed-width text file that you can use in the Example sections later in the article, follow these steps:
Example 1To create a recordset that uses data from a text file (Contacts.txt), follow these steps:
Example 2To create a table linked to a text file (Contacts.txt), follow these steps:
For more information about accessing data in a text file, search on "accessing data in text documents," using the Microsoft Access Help Index.
For more information about how to use the Schema.ini file, visit the following Microsoft Developer Network (MSDN) Web site:
Schema.ini File (Text File Driver)
Article ID: 149090 - Last Review: January 19, 2007 - Revision: 4.3
Contact us for more help
Connect with Answer Desk for expert help.