I encounter an error ('\csvFile.csv' is not a correct path.Check if the path name is correct
)while trying to load csv file to datagridview
using OleDB connection
:
MyConnection = new System.Data.OleDb.OleDbConnection("Provider = Microsoft.Jet.OLEDB.4.0; Data Source = '\\csvFile.csv'; Extended Properties = \"text;HDR=Yes;FMT=Delimited\"");
What is correct format of this connection string?File is located within project's folder.
In different window I'm loading the same csv file using StreamReader. It works fine.Would that influence the OleDB connection?