Solved ( Reference for Access 2000

Posted on 2011-10-31
Last Modified: 2012-06-27

I am trying to connect to tan Access 2000 database using the code below but am getting the error
'The Microsoft.Ace.OLEDB.4.0' provider is not registered on the local machine
What refderence should I add here
Imports System.Data
Imports System.Data.OleDb

Public Class _Default
    Inherits System.Web.UI.Page

    Dim oFullPath As String = Environ("userprofile") & "\Desktop\Test.mdb"
    Dim ConnectionString As String = "Provider=Microsoft.ACE.OLEDB.4.0;Data Source=" & oFullPath & ";"

    Dim dbadp As OleDbDataAdapter
    Dim dTable As New DataTable

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

    End Sub

    Protected Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        Call Fill_GridView1()
    End Sub

    Sub Fill_GridView1()

            Dim sSQL As String

            sSQL = "SELECT * FROM Test"
            Dim connection As New OleDbConnection(ConnectionString)
            dbadp = New OleDbDataAdapter(sSQL, connection)

            Me.GridView1.DataSource = dTable
            'Me.DataGridView1.Columns(0).Width = 0

        Catch ex As Exception
        End Try

    End Sub
End Class

Open in new window

Question by:murbro
    LVL 69

    Accepted Solution


    Author Closing Comment

    thanks very much

    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    jquery, aspx 10 34
    Effect on button 11 40
    Pick image, show data 4 25 produce a pdf from a GridView 2 26
    In this Article, I will provide a few tips in problem and solution manner. Opening an ASPX page in Visual studio 2003 is very slow. To make it fast, please do follow below steps:   Open the Solution/Project. Right click the ASPX file to b…
    Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now