G
Guest
I've created a windows application with the follwoing code, and it works just fine:
string strConn;
strConn = "Provider=Microsoft.Jet.OLEDB.4.0;" +
"Data Source=" + System.AppDomain.CurrentDomain.BaseDirectory
+ "//XL//my.xls;" + "Extended Properties=Excel 8.0;";
OleDbDataAdapter myCommand = new OleDbDataAdapter("SELECT * FROM
[my$]", strConn);
DataSet myDataSet = new DataSet();
myCommand.Fill(myDataSet, "ExcelInfo");
When I try and run this under asp.net, I get the following error:
Unspecified error
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information about
the error and where it originated in the code.
Exception Details: System.Data.OleDb.OleDbException: Unspecified error
I(ASP.NET) has full rights on the folder and the temp folder(http://support.microsoft.com/default.aspx?scid=kb;en-us;827190).
Is there something else I miss?
string strConn;
strConn = "Provider=Microsoft.Jet.OLEDB.4.0;" +
"Data Source=" + System.AppDomain.CurrentDomain.BaseDirectory
+ "//XL//my.xls;" + "Extended Properties=Excel 8.0;";
OleDbDataAdapter myCommand = new OleDbDataAdapter("SELECT * FROM
[my$]", strConn);
DataSet myDataSet = new DataSet();
myCommand.Fill(myDataSet, "ExcelInfo");
When I try and run this under asp.net, I get the following error:
Unspecified error
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information about
the error and where it originated in the code.
Exception Details: System.Data.OleDb.OleDbException: Unspecified error
I(ASP.NET) has full rights on the folder and the temp folder(http://support.microsoft.com/default.aspx?scid=kb;en-us;827190).
Is there something else I miss?