W
with a question
Hi this is the code i have written.
my csv file looks lke this
Column1,Column2,Column3
1,1,1
43,43,4
132,234,243
54,53,46
but still i get only
null null null
null null null
null null null
in my datagrid - what should i do.
Dim cn As New
OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\;Extended Properties=""Text;HDR=No;FMT=Delimited""")
Dim da As New OleDbDataAdapter
Dim ds As New DataSet
Dim cd As New OleDbCommand("SELECT * FROM C:\Test1.csv", cn)
cn.Open()
da.SelectCommand = cd
ds.Clear()
da.Fill(ds, "CSV")
DataGrid1.DataSource = ds.Tables(0)
cn.Close()
my csv file looks lke this
Column1,Column2,Column3
1,1,1
43,43,4
132,234,243
54,53,46
but still i get only
null null null
null null null
null null null
in my datagrid - what should i do.
Dim cn As New
OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\;Extended Properties=""Text;HDR=No;FMT=Delimited""")
Dim da As New OleDbDataAdapter
Dim ds As New DataSet
Dim cd As New OleDbCommand("SELECT * FROM C:\Test1.csv", cn)
cn.Open()
da.SelectCommand = cd
ds.Clear()
da.Fill(ds, "CSV")
DataGrid1.DataSource = ds.Tables(0)
cn.Close()