[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


ASP.net (VB.net) Reference for Access 2000

Posted on 2011-10-31
Medium Priority
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:Murray Brown
LVL 70

Accepted Solution

Éric Moreau earned 2000 total points
ID: 37056163

Author Closing Comment

by:Murray Brown
ID: 37136836
thanks very much

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…

873 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