I have a .csv file.
How can I read it into DataTable?

Re: How to read a csv file into DataTable by Cor

Cor
Mon May 08 05:46:05 CDT 2006

Ad,

If you look two messages below you see my answer on that.

Cor

"ad" <flying@wfes.tcc.edu.tw> schreef in bericht
news:ui$rRuocGHA.3900@TK2MSFTNGP05.phx.gbl...
>I have a .csv file.
> How can I read it into DataTable?
>



Re: How to read a csv file into DataTable by ad

ad
Mon May 08 07:02:29 CDT 2006

Thanks,
But I can't find your answer.



"Cor Ligthert [MVP]" <notmyfirstname@planet.nl> ¼¶¼g©ó¶l¥ó·s»D:%23uvXbxocGHA.2404@TK2MSFTNGP03.phx.gbl...
> Ad,
>
> If you look two messages below you see my answer on that.
>
> Cor
>
> "ad" <flying@wfes.tcc.edu.tw> schreef in bericht
> news:ui$rRuocGHA.3900@TK2MSFTNGP05.phx.gbl...
>>I have a .csv file.
>> How can I read it into DataTable?
>>
>
>



Re: How to read a csv file into DataTable by Cor

Cor
Mon May 08 08:27:30 CDT 2006

Do you not see a message from Tomb?

"ad" <flying@wfes.tcc.edu.tw> schreef in bericht
news:en7uMdpcGHA.4932@TK2MSFTNGP03.phx.gbl...
> Thanks,
> But I can't find your answer.
>
>
>
> "Cor Ligthert [MVP]" <notmyfirstname@planet.nl>
> ¼¶¼g©ó¶l¥ó·s»D:%23uvXbxocGHA.2404@TK2MSFTNGP03.phx.gbl...
>> Ad,
>>
>> If you look two messages below you see my answer on that.
>>
>> Cor
>>
>> "ad" <flying@wfes.tcc.edu.tw> schreef in bericht
>> news:ui$rRuocGHA.3900@TK2MSFTNGP05.phx.gbl...
>>>I have a .csv file.
>>> How can I read it into DataTable?
>>>
>>
>>
>
>



Re: How to read a csv file into DataTable by Paul

Paul
Mon May 08 09:25:46 CDT 2006

On Mon, 8 May 2006 18:38:32 +0800, "ad" <flying@wfes.tcc.edu.tw> wrote:

¤ I have a .csv file.
¤ How can I read it into DataTable?
¤

Dim TextConnectionString As String
TextConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & "e:\My Documents\TextFiles" & ";" & _
"Extended Properties=""Text;HDR=NO;"""

Dim TextConn As New System.Data.OleDb.OleDbConnection(TextConnectionString)
TextConn.Open()

Dim da As New System.Data.OleDb.OleDbDataAdapter("Select * from test.csv", TextConn)

Dim ds As DataSet = New DataSet("CSVFiles")
da.Fill(ds, "TestFile")

'...
'...

TextConn.Close()


Paul
~~~~
Microsoft MVP (Visual Basic)