Search Button for VB 2005 Access Database RRS feed

  • Question

  • Hello everyone,


    I've been trying to create a search button that takes information from a textbox and searches a datagrid for similar entries - basically a robust search button, but without any luck.


    The code is now:


    Dim connection As New OleDbConnection

    ("Provider=Microsoft.Jet.OLEDB.4.0;Source=C:\MSDS\MSDS DATABASE DATA\MSDS.mdb;")

    Dim [command] As New OleDbCommand("SELECT * FROM Students WHERE FirstName LIKE ?", connection)

    [command].Parameters.AddWithValue("@FirstName", Me.TextBox1.Text & "%")


            Dim rdr As OleDbDataReader = command.ExecuteReader()

            Dim tbl As New DataTable()
            Me.StudentsDataGridView.DataSource = tbl



    And there is a crash due to connection.Open() stating: Could not find installable ISAM.

    I tried to fix the problem through this:




    But all registry references were correct and files were found.


    EDIT: Probably has something to do with the fact that I don't have Microsoft Access installed.  Tho that hasn't stopped me up to this point.


    Maybe one way to get rid of that error is to make my open connection command more explicit:


    Monday, July 30, 2007 7:48 PM

All replies

  • Hi Mendozagold,

    I am moving this thread from Visual Basic Express Edition forum to the .NET Framework Data Access and Storage forum, since the issue is related to OLEDB. There are more OLEDB experts in the .NET Framework Data Access and Storage forum.

    Thanks for your understanding!

    Wednesday, August 1, 2007 3:03 AM