|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
How to read a csv file into DataTableAd,
If you look two messages below you see my answer on that. Cor Show quote "ad" <fly***@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? > Thanks,
But I can't find your answer. Show quote "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> ¼¶¼g©ó¶l¥ó·s»D:%23uvXbxocGHA.2***@TK2MSFTNGP03.phx.gbl... > Ad, > > If you look two messages below you see my answer on that. > > Cor > > "ad" <fly***@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? >> > > Do you not see a message from Tomb?
Show quote "ad" <fly***@wfes.tcc.edu.tw> schreef in bericht news:en7uMdpcGHA.4932@TK2MSFTNGP03.phx.gbl... > Thanks, > But I can't find your answer. > > > > "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> > ¼¶¼g©ó¶l¥ó·s»D:%23uvXbxocGHA.2***@TK2MSFTNGP03.phx.gbl... >> Ad, >> >> If you look two messages below you see my answer on that. >> >> Cor >> >> "ad" <fly***@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? >>> >> >> > > On Mon, 8 May 2006 18:38:32 +0800, "ad" <fly***@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) |
|||||||||||||||||||||||