becks774
Programmer
- Jun 25, 2007
- 14
Hello All,
I have this code that I am trying to read a CSV file into a Data Set. I have been researching this quite a bit and have tried the resolutions I have found.
If I se this code, the values that are not numeric do not get read into the dataset:
If I try this connection string, I get an " "Could not find installable ISAM."" error:
Please help.
Thank you!
I have this code that I am trying to read a CSV file into a Data Set. I have been researching this quite a bit and have tried the resolutions I have found.
If I se this code, the values that are not numeric do not get read into the dataset:
Code:
con.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" + "Data Source=" + IO.Path.GetDirectoryName(strCurrent) + ";" + "Extended Properties=""Text;HDR=No;IMEX=1"""
con.Open()
cmd.Connection = con
cmd.CommandText = "SELECT * FROM MPMCurrent1.csv"
da.SelectCommand = cmd
da.Fill(ds, "Actuals")
If I try this connection string, I get an " "Could not find installable ISAM."" error:
Code:
con.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" + "Data Source=" + IO.Path.GetDirectoryName(strCurrent) + ";" + "Extended Properties=""IMEX=1"""
con.Open()
cmd.Connection = con
cmd.CommandText = "SELECT * FROM MPMCurrent1.csv"
da.SelectCommand = cmd
da.Fill(ds, "Actuals")
Please help.
Thank you!