T
tshad
I have a program that is reading a .csv file into a dataset and works fine
except that it is dropping the first line. I assume that is because it is
dropping the header. The problem is the first line is not a header.
This was working before and I am not sure what caused it not to work. I am
using OleDbDataAdapter.
Dim ConStr As String = _
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
path & ";Extended Properties=""Text;HDR=No;FMT=Delimited\"""
Dim conn As New OleDb.OleDbConnection(ConStr)
Dim da As New OleDb.OleDbDataAdapter("Select * from " & pathfile, conn)
da.Fill(DataSetObj)
When I look at the DataSet, all the rows are there except the first line.
I also change the HDR parameter to HDR=Yes just to see what would happen and
it still dropped the header.
What is happening here?
Thanks,
Tom
except that it is dropping the first line. I assume that is because it is
dropping the header. The problem is the first line is not a header.
This was working before and I am not sure what caused it not to work. I am
using OleDbDataAdapter.
Dim ConStr As String = _
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
path & ";Extended Properties=""Text;HDR=No;FMT=Delimited\"""
Dim conn As New OleDb.OleDbConnection(ConStr)
Dim da As New OleDb.OleDbDataAdapter("Select * from " & pathfile, conn)
da.Fill(DataSetObj)
When I look at the DataSet, all the rows are there except the first line.
I also change the HDR parameter to HDR=Yes just to see what would happen and
it still dropped the header.
What is happening here?
Thanks,
Tom