How to Change the Data Type of an ODBC Text File Data Source
Description
ODBC defines the data type for fields used in a text data files/tables. It may be necessary to change data types in some cases. This article explains how to accomplish this.
Available data types in ODBC:
How to Change the Data Type of an ODBC Text File Data Source
- In Administrative Tools select ODBC Data Sources (32-bit) and then click on the System DSN tab.
- Select the target data source from the listing.
- Select Configure.
- Click on Options and then Select Define Format (insure that the 'Use Current Directory is UNCHECKED' so that the Define Format selection is available)
- Select the correct table from the list presented
- Verify the column names match the field names in the target text document.
- Select the target Column name (insure it is highlighted as shown above).
- Click on the Data Type drop-down and select the required data type.
- Click OK to apply the change.
Note:
This data type information is stored in the schema.ini file that is kept in the same directory as the text data source.
Sample 'Schema.ini' for the example above;
[lesson3.txt]
ColNameHeader=False
Format=FixedLength
MaxScanRows=25
CharacterSet=OEM
Col1=STOCKNUM Char Width 4
Col2=DESCRIPTION Char Width 13
Col3=FINISH Char Width 11
Col4=UPC Char Width 11
Article Number
2017108
Versions
LPS 9.x to LPS 11.x
Environment
Windows