Hi there
Im trying to connect to the DB using oleDb . I am tryign to connect to an Excel DB
Based on all sources I could find on the net, the connection string has to be
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\MyExcel.xls;Extended Properties=""Excel 8.0;HDR=Yes;IMEX=1"""
explanation:
"HDR=Yes;" indicates that the first row contains columnnames, not data
"IMEX=1;" tells the driver to always read "intermixed" data columns as text
Text
So, in my program, Im writing ===>
OleDbConnection conn = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=C:\\xl.xls;Extended Properties=\"Excel 8.0\";\"HDR=Yes;IMEX=1\"\"");
I keep getting an exception saying that "Format of the initialization string does not conform to the OLE DB specification. Starting around char[102] in the connection string
What am I doing wrong?