>Hi Cetin,
>
>thank you for the sample. Now I understand.
>
>Is there also a command to read the CSV file directly into a database table? (similar to VFP's APPEND FROM)
>
>BTW, did the FMT=Delimited really split the record into distinct fields at your machine? I had to use a Schema.ini file instead to get it split.
>
>[Adressen.txt]
>Format=CSVDelimited
>DecimalSymbol=.
>ColNameHeader=False
>
>
>Markus
It did on mine (but I used ';' as the 'comma', becuase my home computer was configured with European settings - namely Turkish). I forgot to warn you that you might need to add the schema.ini (actually added but later stripped schema.ini writing code in sample). Secondly it's a little weird that CSV doesn't mean CommaSeparatedValue to that provider. Instead it uses 'list separator' as the 'comma' and that changes based on region! For European regions the 'comma' is ';'. It looks like the driver has the same stupidiy as Excel and you could use that for your benefit. Open the file in excel and if it separates the columns instead of putting them all into A column then you have the correct default format for that particular machine. Schema.ini is better and probably it'd be much better if used with tabdelimited.
This is the starter for reading directly into a DataTable. In 2.0 DataTable has a Load method that takes a DataReader (in sample it is using a reader to list records).
Cetin