none
Microsoft.ACE.OLEDB.12.0 RRS feed

  • Question

  • i could not find Microsoft.ACE.OLEDB.12.0 in my dataset, what should i do?
    i want to connect my Visual Basic 2015 to Access 2016. 
    Saturday, December 5, 2015 7:25 AM

Answers

  • Hi ShAdOw202020,

    You maybe missed the ‘Microsoft.ACE.OLEDB.12.0’ assembly. You could Refer to the following link to install the assembly.

    https://social.msdn.microsoft.com/Forums/en-US/1d5c04c7-157f-4955-a14b-41d912d50a64/how-to-fix-error-the-microsoftaceoledb120-provider-is-not-registered-on-the-local-machine?forum=vstsdb

    I also encountered the same issue before, the problem was solved when I installed this link below.

    https://www.microsoft.com/en-us/download/confirmation.aspx?id=23734

    You could refer to my code snippet below.

    Sub Main()
            Try
                Dim cnstr = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=D:\Data\MyAccessData.accdb"
                Dim cn As OleDbConnection = New OleDbConnection(cnstr)
                cn.Open() '/*open connection*/ 
                Dim sqlstr = "select * from Product"
                Dim cmd As OleDbCommand = New OleDbCommand()
                cmd.CommandText = sqlstr
                cmd.Connection = cn
                Dim sda As OleDbDataAdapter = New OleDbDataAdapter(sqlstr, cn)
                Dim ds As DataSet = New DataSet()
                sda.Fill(ds, "ds")
                cn.Close() '/*close conn*/
            Catch ex As Exception
                Console.WriteLine(ex.Message)
                'Throw ex
            End Try
            Console.ReadKey()
    End Sub
    
    Best regards,
    Cole

    Tuesday, December 8, 2015 12:54 AM
    Moderator

All replies

  • i could not find Microsoft.ACE.OLEDB.12.0 in my dataset, what should i do?
    i want to connect my Visual Basic 2015 to Access 2016. 

    Please check if you forget to install access runtime on your machine. Usually they are sitting in

    C:\Program Files (x86)\Common Files\Microsoft Shared\OFFICE15

    You could download runtime from the following link. http://www.microsoft.com/en-in/download/details.aspx?id=39358

    I hope it helps.

    Regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, December 7, 2015 9:47 AM
    Moderator
  • Hi ShAdOw202020,

    You maybe missed the ‘Microsoft.ACE.OLEDB.12.0’ assembly. You could Refer to the following link to install the assembly.

    https://social.msdn.microsoft.com/Forums/en-US/1d5c04c7-157f-4955-a14b-41d912d50a64/how-to-fix-error-the-microsoftaceoledb120-provider-is-not-registered-on-the-local-machine?forum=vstsdb

    I also encountered the same issue before, the problem was solved when I installed this link below.

    https://www.microsoft.com/en-us/download/confirmation.aspx?id=23734

    You could refer to my code snippet below.

    Sub Main()
            Try
                Dim cnstr = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=D:\Data\MyAccessData.accdb"
                Dim cn As OleDbConnection = New OleDbConnection(cnstr)
                cn.Open() '/*open connection*/ 
                Dim sqlstr = "select * from Product"
                Dim cmd As OleDbCommand = New OleDbCommand()
                cmd.CommandText = sqlstr
                cmd.Connection = cn
                Dim sda As OleDbDataAdapter = New OleDbDataAdapter(sqlstr, cn)
                Dim ds As DataSet = New DataSet()
                sda.Fill(ds, "ds")
                cn.Close() '/*close conn*/
            Catch ex As Exception
                Console.WriteLine(ex.Message)
                'Throw ex
            End Try
            Console.ReadKey()
    End Sub
    
    Best regards,
    Cole

    Tuesday, December 8, 2015 12:54 AM
    Moderator
  • Hi Cole!

    After struggling for a couple of days, I stumbled upon your suggestion above. It worked!

    Thank you, and may the force be with you!

    Linnea


    LinneaE

    • Proposed as answer by LinneaE Monday, January 11, 2016 9:13 PM
    Monday, January 11, 2016 9:13 PM