Click here to Skip to main content
15,888,454 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hello developers i am using visual studio 2010 ultimate and microsoft access 2007 for developing a simple standalone database while i tried to run a test code for login form and the visual studio failed to connect with ms access and it responds "microsoft.jet.oledb.12.0" provider is no registered in the local machine. when i changed "provider=microsoft.jet.oledb.12.0" to "provider=microsoft.ace.oledb.12.0" it responds " could not find installable ISAM"

What I have tried:

VB
Imports System.Data
Imports System.Data.OleDb
Public Class FrmLogIn
    Dim i As Boolean
    Dim ds As New DataSet
    Dim sql As String
    Dim da As OleDbDataAdapter
    Dim con As New OleDbConnection("provider=microsoft.jet.oledb.12.0; datasource= C:\Users\Admin\Desktop\test.accdb")
    Private Sub FrmLogIn_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Try
            con.Open()
        Catch OleDbExceptionErr As OleDbException
            MessageBox.Show(OleDbExceptionErr.Message, "Access Error")
        Catch InvalidOperationExceptionErr As InvalidOperationException
            MessageBox.Show(InvalidOperationExceptionErr.Message, "Access Error")
        End Try
        If con.State <> ConnectionState.Open Then
            MessageBox.Show("Database Connection is Failed")
            Exit Sub
        End If

    End Sub
End Class
Posted
Updated 21-Feb-19 20:47pm
v4
Comments
Dave Kreskowiak 21-Feb-19 11:26am    
Where did you get that connection string from? It's not the first time I've seen that mistake in a question around here.

The JET engine doesn't have a version 12 and doesn't work with ACCDB files. The ACE engine replaced JET and it started with version 12 and it does work with ACCDB files.

There are two possibilities here: JET V12 isn't installed at all on that machine, or it is but the wrong "type". Check your app: is is set for "x86"? Because if it isn't, you can't use the JET database engine at all as it's only available in 32 bit versions.
JET was superseded by the ACE database engine many years ago, and is available in 32 bit and 64 bit versions.
I'd strongly suggest that you install the 64bit version of the ACE database engine and use that instead: Download Microsoft Access Database Engine 2010 Redistributable from Official Microsoft Download Center[^]
 
Share this answer
 
Your connection string is incorrect. The version of Jet is 4.0, you are probably thinking of Download Microsoft Access Database Engine 2016 Redistributable from Official Microsoft Download Center[^].
 
Share this answer
 
You are using the incorrect connection string; the last version of JET was 4.0, and it was replaced with ACE 12.0.

Try this instead:
VB
Dim con As New OleDbConnection("provider=Microsoft.ACE.OLEDB.12.0; datasource= C:\Users\Admin\Desktop\test.accdb")
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900