shriop
Tue Aug 02 14:43:35 CDT 2005
You could try my csv parser that I sell,
http://www.csvreader.com . It
has a method that will return a DataTable of all the values from the
file.
Paul Clement wrote:
> On 2 Aug 2005 07:53:08 -0700, ds_pam@hotmail.com wrote:
>
> =A4 Hi
> =A4 I'm using OLEDB to fill a dataset from CSV file.
> =A4 it works great - too great.
> =A4 the dataset recognizes some text fields as integers. for example the
> =A4 date 02/08/05 is transformed to 20805.
> =A4 I want the dataset to read all data as strings.
> =A4 I can't use schema files because the CSV files are generated at runti=
me
> =A4 with different names and column number,
> =A4 and I can't manipulate the files I read.
> =A4 any ideas?
>
> You cannot force the Text driver to assume the data type of certain colum=
ns without a schema.ini
> file. In the absence of such a file the driver makes a "best guess" depen=
ding upon the data present.
> Unfortunately it doesn't always generate the results you expect or desire.
>
> If the files follow a standard structure you could just create the schema=
.ini file entries "on the
> fly".
>
>
http://www.mentalis.org/soft/class.qpx?id=3D6
>=20
>=20
> Paul
> ~~~~
> Microsoft MVP (Visual Basic)