Could not find installable ISAM

S

sina

hi, engineer:

Today, I used the following program to open excel 2003 file, I got an issue.

the connect string :
if (System.IO.File.Exists(path))
{
strConn = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + path + ";Extended Properties=Excel 8.0;IMEX=1";
OleDbConnection Conn = new OleDbConnection(strConn);
string SQL = "select * from [AssayResExample01$]";

OleDbDataAdapter da = new OleDbDataAdapter(SQL, strConn);
DataSet ds = new DataSet();
da.Fill(ds);
Conn.Close();

this.dgImport.DataSource = ds;
this.dgImport.DataBind();
}


Issue:
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: Could not find installable ISAM.

Source Error:

Line 93: OleDbDataAdapter da = new OleDbDataAdapter(SQL, strConn);
Line 94: DataSet ds = new DataSet();
Line 95: da.Fill(ds);
Line 96: Conn.Close();
Line 97: Stack Trace: [OleDbException (0x80004005): Could not find installable ISAM.]
System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection) +1059617
System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject) +53
System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup) +27
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +47
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +105
System.Data.OleDb.OleDbConnection.Open() +37
System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +121
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +137
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) +86
TRX.Import.ListData() in E:\TRX\TRX\Import.aspx.cs:95
TRX.Import.btnConnecttoBASIS_Click(Object sender, EventArgs e) in E:\TRX\TRX\Import.aspx.cs:32
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +105
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +107
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102



could you tell me how to slove it?
thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top