JDBC Tutorials - Herong's Tutorial Examples - Version 3.02, by Dr. Herong Yang
JDBC-ODBC - ODBC Configuration for Flat Files
This section describes how to setup the ODBC configuration including column definitions for flat text files.
In order for the ODBC driver to work with your flat data files, I need to review and revise the ODBC configuration for my DSN, HY_FLAT. Here is what I did:
1. Run Control Panel > Administrative Tools > Data Sources (ODBC).
2. Click the System DSN tab, select HY_FLAT, Microsoft Text Driver (*.txt; *.csv), and click the Configure button.
3. Click the Options button on the ODBC Text Setup window, then click the "Define Format" button. The Define Text Format window comes up.
4. Select "user.txt" from the Tables section, and change the following settings:
Column Name Header: checked Format: Tab Delimited Rows to Scan: 25
5. Repeat the same settings for "address.txt", see the picture below:
6. Click OK to close all windows. Now my database with flat files is ready through the ODBC driver.
Notice that the ODBC driver actually stores the table file definitions in a file called schema.ini in the same directory as the flat files.
Last update: 2015.
Table of Contents