Reading data from text files using oledb provider

  • Thread starter Thread starter Jomon Mathew
  • Start date Start date
J

Jomon Mathew

hi,
i 've been trying to read data from a text file using oledb provider.i was
sucessful in reading from one file.But i want to read the data from two
files ie. some data from one file and some from other file. The file is .txt
files and is fixed length files. i 've written the schema to read for one
file.How can write the schema for multiple files?This data is to be
populated to a datagrid through dataset.Please tell me hw can i implement
this?

Sinu
 
¤ hi,
¤ i 've been trying to read data from a text file using oledb provider.i was
¤ sucessful in reading from one file.But i want to read the data from two
¤ files ie. some data from one file and some from other file. The file is .txt
¤ files and is fixed length files. i 've written the schema to read for one
¤ file.How can write the schema for multiple files?This data is to be
¤ populated to a datagrid through dataset.Please tell me hw can i implement
¤ this?

Just create another schema entry in the schema.ini file. Here is an example:

[Report.txt]
ColNameHeader=False
Format=Delimited(;)
CharacterSet=ANSI
Col1=Col1 text
Col2=Col2 text
Col3=Col3 text
Col4=Col4 text
Col5=Col5 text
Col6=Col6 text
Col7=Col7 text
Col8=Col8 text

[CSVFile.csv]
ColNameHeader=False
CharacterSet=ANSI
Format=CSVDelimited
Col1=MyDate Char
Col2=ColName2 Char
Col3=ColName3 Char
Col4=ColName4 Char
Col5=ColName5 Char
Col6=ColName6 Char
Col7=ColName7 Char


Paul ~~~ (e-mail address removed)
Microsoft MVP (Visual Basic)
 
Back
Top