Part 3: The 32-Bit Drivers : The Text Driver : Defining Table Structure on UNIX and Linux

Defining Table Structure on UNIX and Linux
Because text files do not all have the same structure, the driver provides the option to define the structure of an existing file. Although defining the structure is not mandatory, because the driver can attempt to guess the names and types of the columns, this feature is extremely useful.
To define the structure of a text file, you create a QETXT.INI file using any plain text editor, such as vi. The file name must be in uppercase. All of the tables you want to define are specified in the QETXT.INI file. When you specify table attributes in QETXT.INI, you override the attributes specified in the system information file (odbc.ini) or in the connection string.
To define the QETXT.INI file:
1.
emptext.txt=EMP
Table names can be up to 32 characters in length and cannot be the same as another defined table in the database. This name is returned by SQLTables. By default, it is the file name without its extension.
2.
FILE=emptext.txt
TT=COMMA
DC=,
FLN=0
3.
Separate the values with commas. For example, to define two fields:
FIELD1=EMP_ID,VARCHAR,6,0,6,0,
FIELD2=HIRE_DATE,DATE,10,0,10,0,m/d/yy
4.

© 2013 Progress Software Corporation and/or its subsidiaries or affiliates.