I get the exception in the subject line when trying to access an excel sheet and use it to fill a datagrid.
Dim strConn As String
Dim myCommand As OleDb.OleDbDataAdapter
Dim conn As OleDb.OleDbConnection
Dim mydataset As DataSet
strConn = "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data SourceC:\\Inetpub\\wwwroot\\contacts.xls;" & "Extended Properties=Excel 8.0;HDR=NO; IMEX=1;"
conn = New OleDb.OleDbConnection(strConn)
myCommand = New OleDb.OleDbDataAdapter("SELECT * FROM [ContactList$]", strConn)
mydataset = New DataSet
myCommand.Fill(mydataset)
myDatagrid.DataSource = mydataset
myDatagrid.DataBind()
it only happens when i put in the IMEX=1 extended property. if i take it out it works fun, unfortunately i do need numbers mixed with characters.
this is the error page i get:
Could not find installable ISAM.
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 44: myCommand = New OleDb.OleDbDataAdapter("SELECT * FROM [ContactList$]", strConn)
Line 45: mydataset = New DataSet
Line 46: myCommand.Fill(mydataset)
Line 47:
Line 48: myDatagrid.DataSource = mydataset
Source File: c:\inetpub\wwwroot\testers\WebForm1.aspx.vb Line: 46
Stack Trace:
[OleDbException (0x80004005): Could not find installable ISAM.]
System.Data.OleDb.OleDbConnection.ProcessResults(Int32 hr) +20
System.Data.OleDb.OleDbConnection.InitializeProvider() +57
System.Data.OleDb.OleDbConnection.Open() +203
System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection, ConnectionState& originalState) +44
System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +304
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +77
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) +38
testers.WebForm1.Button2_Click(Object sender, EventArgs e) in c:\inetpub\wwwroot\testers\WebForm1.aspx.vb:46
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +57
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain() +1277
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573
kurdtsson
Member
20 Points
4 Posts
Could not find installable ISAM error
Aug 09, 2003 08:34 PM|LINK
Dim strConn As String Dim myCommand As OleDb.OleDbDataAdapter Dim conn As OleDb.OleDbConnection Dim mydataset As DataSet strConn = "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data SourceC:\\Inetpub\\wwwroot\\contacts.xls;" & "Extended Properties=Excel 8.0;HDR=NO; IMEX=1;" conn = New OleDb.OleDbConnection(strConn) myCommand = New OleDb.OleDbDataAdapter("SELECT * FROM [ContactList$]", strConn) mydataset = New DataSet myCommand.Fill(mydataset) myDatagrid.DataSource = mydataset myDatagrid.DataBind()it only happens when i put in the IMEX=1 extended property. if i take it out it works fun, unfortunately i do need numbers mixed with characters. this is the error page i get:Could not find installable ISAM. 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 44: myCommand = New OleDb.OleDbDataAdapter("SELECT * FROM [ContactList$]", strConn) Line 45: mydataset = New DataSet Line 46: myCommand.Fill(mydataset) Line 47: Line 48: myDatagrid.DataSource = mydataset Source File: c:\inetpub\wwwroot\testers\WebForm1.aspx.vb Line: 46 Stack Trace: [OleDbException (0x80004005): Could not find installable ISAM.] System.Data.OleDb.OleDbConnection.ProcessResults(Int32 hr) +20 System.Data.OleDb.OleDbConnection.InitializeProvider() +57 System.Data.OleDb.OleDbConnection.Open() +203 System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection, ConnectionState& originalState) +44 System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +304 System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +77 System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) +38 testers.WebForm1.Button2_Click(Object sender, EventArgs e) in c:\inetpub\wwwroot\testers\WebForm1.aspx.vb:46 System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108 System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +57 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +18 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33 System.Web.UI.Page.ProcessRequestMain() +1277 -------------------------------------------------------------------------------- Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573JimmyM
Star
8796 Points
1671 Posts
Re: Could not find installable ISAM error
Aug 10, 2003 02:39 AM|LINK