I have a csv file in drive C: when I am going to display in datagridview but the 1st line is not display in gatagridview, My csv file content data is as follows
"^NSEI",5040.00,"9/2/2011","6:00am",+39.00,0.00,0.00,0.00,0
"RCOM.NS",84.70,"9/2/2011","6:29am",+5.15,81.90,85.65,79.70,13378691
"RELIANCE.NS",805.45,"9/2/2011","6:29am",+22.85,796.70,813.70,789.45,7791545
"DLF.NS",207.85,"9/2/2011","6:28am",+11.10,194.25,209.90,191.05,10297314
"UNITECH.NS",26.85,"9/2/2011","6:30am",-0.75,27.80,28.45,26.70,44035656
"HANUNG.NS",101.10,"9/2/2011","6:29am",-0.50,102.35,104.80,100.60,326326
"LITL.NS",16.75,"9/2/2011","6:29am",-0.30,17.00,17.50,16.35,9415675
"INDIABULL.NS",149.95,"9/2/2011","6:28am",-4.00,155.00,157.00,148.50,677258
My code is below:
Dim csvFileFolder As String = "C:\"
Dim csvFileName As String = "Test2.csv"
Dim connString As String = "Driver={Microsoft Text Driver (*.txt; *.csv)};Dbq=" _
& csvFileFolder & ";Extended Properties=""Text;HDR=No;FMT=Delimited"""
Dim conn As New Odbc.OdbcConnection(connString)
'Open a data adapter, specifying the file name to load
Dim da As New Odbc.OdbcDataAdapter("SELECT * FROM [" & csvFileName & "]", conn)
'Then fill a data table, which can be bound to a grid
Dim dt As New DataTable
da.Fill(dt)
'MsgBox(dt)
DataGridView2.DataSource = dt
somebody please help me to resolve the problem