tags:

views:

53

answers:

3

hi, I have following code and i got the "Unspecified error" when executed.

OleDbConnection ExcelConnection = new oleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + pathName + "; Extended Properties=Text;");

         ExcelConnection.Open();

Many thanks in advance

A: 

See ConnectionStrings.com.

Anton Gogolev
+2  A: 

For loading csv, consider CsvReader - fully managed, very fast, and robust. I've used in in numerous projects. More importantly, no messing with OLEDB.

Marc Gravell
A: 

Assuming the connetion string is fine, is the csv file already open before the call ? If so close then retry.

Ferdeen