I have the following code:
OleDbConnection connection = new OleDbConnection(string.Format(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source={0}; Extended Properties=""text;HDR=Yes;FMT=Delimited"";", Path.GetDirectoryName(ofd.FileName)));
OleDbCommand command = new OleDbCommand("SELECT * FROM " + Path.GetFileName(ofd.FileName), connection);
OleDbDataAdapter adapter = new OleDbDataAdapter(command);
Export_btn.Enabled = false;
Report_btn.Enabled = false;
Start_btn.Enabled = false;
Start_btn.Text = "Loading CSV...";
adapter.Fill(dt);
And this csv:
But it return an import error showing that the epc column need int32 type. And the expection = System.ArgumentException
How can I fix it?