why do i need to use OleDb to read .CSV file ?.....Can .CSV file contain datatype other then string ?
Thursday, August 09, 2012 5:15 PM
I'm just writing some app ...which reads .CSV file and show it on the page ...
my question is why do i need to use OleDb for reading .CSV file ?
other is ....Can .csv file contain datatype like ...int,datetime,bit ?
because .csv file is text based file ...isn't it ?
Thursday, August 09, 2012 6:10 PM
You don't need to use OLEDB to read a .CSV file unless you want to use the Text ISAM driver and optional schema.ini file to define the structure. Yes, you can define the expected data type of a column, using a schema.ini file, prior to reading the data, but since the contents of a .CSV file consists only of text there is no actual associated data type.
Paul ~~~~ Microsoft MVP (Visual Basic)
- Marked As Answer by Bob Wu-MTMicrosoft Contingent Staff, Moderator Monday, August 13, 2012 5:58 AM
Friday, August 10, 2012 8:53 AM
Agree with Paul.
OLEDB is just an option to read .csv file on RDBMS way. Why people prefer is to use oledb is you can do all kind of DML operations letting OLEDB to do all IO operation.
.CSV file do not contains data type information (schema) but it can contain any type of data which you may need to validate while reading the data like you do XSD validation for XML for that you can use .in file Paul was talking about.