Hi,

I'm trying to use a csv file as my data source, I've used the
Microsoft.Jet.OLEDB.4.0 as my OLE DB Provider. My conexion string is

Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\Mydir;Extended
Properties="text;HDR=Yes;FMT=CSVDelimited"

and my query is

Select * from myfile.csv

But the result set I've got shows just one column, instead of the
three that are in the file. (separated by comma)

What's wrong? How could I config the datasource to get data from a csv
without importing it to my SQL DB?

Regards,

Vinicius Bellino

RE: Using a CSV as data source by eswan

eswan
Tue May 03 12:41:07 CDT 2005

Information for text at:
http://support.microsoft.com/default.aspx?scid=kb;en-us;326548

To get the other columns, use a schema.ini file
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odbc/htm/odbcjetschema_ini_file.asp?frame=true


"Vinicius Bellino" wrote:

> Hi,
>
> I'm trying to use a csv file as my data source, I've used the
> Microsoft.Jet.OLEDB.4.0 as my OLE DB Provider. My conexion string is
>
> Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\Mydir;Extended
> Properties="text;HDR=Yes;FMT=CSVDelimited"
>
> and my query is
>
> Select * from myfile.csv
>
> But the result set I've got shows just one column, instead of the
> three that are in the file. (separated by comma)
>
> What's wrong? How could I config the datasource to get data from a csv
> without importing it to my SQL DB?
>
> Regards,
>
> Vinicius Bellino
>

RE: Using a CSV as data source by kire

kire
Tue May 03 12:43:07 CDT 2005

Information for text at:
http://support.microsoft.com/default.aspx?scid=kb;en-us;326548

To get the other columns, use a schema.ini fil
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odbc/htm/odbcjetschema_ini_file.asp?frame=true

"Vinicius Bellino" wrote:

> Hi,
>
> I'm trying to use a csv file as my data source, I've used the
> Microsoft.Jet.OLEDB.4.0 as my OLE DB Provider. My conexion string is
>
> Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\Mydir;Extended
> Properties="text;HDR=Yes;FMT=CSVDelimited"
>
> and my query is
>
> Select * from myfile.csv
>
> But the result set I've got shows just one column, instead of the
> three that are in the file. (separated by comma)
>
> What's wrong? How could I config the datasource to get data from a csv
> without importing it to my SQL DB?
>
> Regards,
>
> Vinicius Bellino
>