Reading Text File (Flat FIle) using ODBC Driver in .NET
Reading Text File using ODBC Driver in .NETWhen the Text driver is used, the format of the text file is determined by using a schema information file. The schema information file, which is
January 1, 2006
Reading Text File using ODBC Driver in .NET
When the Text driver is used, the format of the text file is determined by using a schema information file. The schema information file, which is always named Schema.ini and always kept in the same directory as the text data source, provides the IISAM with information about the general format of the file, the column name and data type information, and a number of other data characteristics. A Schema.ini file is always required for accessing fixed-length data; you should use a Schema.ini file when your text table contains DateTime, Currency, or Decimal data or any time you want more control over the handling of the data in the table.
The schema includes information about each table (text file) in a data source, including the table's format, the number of rows to scan to determine column types, whether the first row of the table contains column names, whether the source file is written using an OEM or ANSI codepage, and each column's name, data type, and width.
A Single Schema.ini can contain information for multiple files
-------------- START OF SCHEME--------
[datafile.txt]
ColNameHeader=false
MaxScanRows=0
Format=FixedLength
Col1="Emp Name" Text Width 6
Col2="Emp Code" Text Width 4
-------------- END OF SCHEME--------
Reference (MSDN) : ms-help://MS.MSDNQTR.2003FEB.1033/odbc/htm/odbcjetsdk_98.htm
About the Author
You May Also Like