G
Guest
Hello eveyone,
I have the below code which is trying to load an Excel file into a DataSet,
however it errors at the oAdapter.Fill(ds); line with An unhandled exception
of type 'System.Data.OleDb.OleDbException' occurred in system.data.dll. Can
anyone spot the a reason why. or help with things that I could look at?
Thamks all,
OleDbConnection objConn=new OleDbConnection(sConnectionString);
objConn.Open();
OleDbCommand oCmd=new OleDbCommand("SELECT * FROM [ZREPSLET$]", objConn);
OleDbDataAdapter oAdapter=new OleDbDataAdapter();
oAdapter.SelectCommand = oCmd;
DataSet ds=new DataSet();
oAdapter.Fill(ds);
I have the below code which is trying to load an Excel file into a DataSet,
however it errors at the oAdapter.Fill(ds); line with An unhandled exception
of type 'System.Data.OleDb.OleDbException' occurred in system.data.dll. Can
anyone spot the a reason why. or help with things that I could look at?
Thamks all,
OleDbConnection objConn=new OleDbConnection(sConnectionString);
objConn.Open();
OleDbCommand oCmd=new OleDbCommand("SELECT * FROM [ZREPSLET$]", objConn);
OleDbDataAdapter oAdapter=new OleDbDataAdapter();
oAdapter.SelectCommand = oCmd;
DataSet ds=new DataSet();
oAdapter.Fill(ds);