trying to select data from access database RRS feed

  • Question

  • User1638057951 posted

    Hi all,

    I connect to access database 2003 through asp.net and my code underhere

    1    Dim cn As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;DataSource=C:\Inetpub\wwwroot\database\Sample.mdb;")
    2            Dim da As New OleDbDataAdapter("select * from cusitms", cn)
    3            Dim ds As New DataSet
    4            Dim dt As New DataTable
    5            da.Fill(dt)
    6            da.Dispose()
    7            cn.Dispose()
    8            Me.customers.DataSource = dt
    9            Me.customers.DataBind()
    and i thing nothing wrong in code but when trying to execute the code i get the folllowing error (line 5)


    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 43:         Dim ds As New DataSet
    Line 44:         Dim dt As New DataTable
    Line 45:         da.Fill(dt)
    Line 46:         da.Dispose()
    Line 47:         cn.Dispose()
    Source File: C:\Inetpub\wwwroot\SpreaReports\Customers.aspx.vb    Line: 45 
    Stack Trace: 
    [OleDbException (0x80004005): Could not find installable ISAM.]
       System.Data.OleDb.OleDbConnection.ProcessResults(Int32 hr)
       System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection, ConnectionState& originalState)
       System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
       System.Data.Common.DbDataAdapter.Fill(DataTable dataTable, IDbCommand command, CommandBehavior behavior)
       System.Data.Common.DbDataAdapter.Fill(DataTable dataTable)
       SpreaReports.Customer.Page_Load(Object sender, EventArgs e) in C:\Inetpub\wwwroot\SpreaReports\Customers.aspx.vb:45
       System.Web.UI.Control.OnLoad(EventArgs e)
        any help i will be appriciated , thanks in advance


    Saturday, December 27, 2008 1:32 PM


  • User-821857111 posted

    There should be a space between the words "Data" and "Source" in your connection string:

    Dim cn As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Inetpub\wwwroot\database\Sample.mdb;")

    You can delete Line 3, too.  You create a DataSet but never actually use it.


    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, December 27, 2008 3:42 PM