0

I am trying to write an app on vb.net. I am using visual studio community 2013. In some point I have to create mdb file. I searched all over internet and try every suggestions but always I get error on adox as follows (marked with *)

Namespace ADOX
Class Catalog

    Sub Create(sCreateString As String)
       ***Throw New NotImplementedException***
    End Sub

End Class
End Namespace

my script quite long but this is what I use for create mdb file

    Option Explicit On
    Imports System.Data.OleDb
    Imports System.IO
    Imports System.Linq
    Imports System.Data.SqlClient
    Imports ADOX

....

    Public Sub MakeADataBase(ByVal sDBName As String)
            Dim catArch = New ADOX.Catalog
            catArch.Create("Provider=Microsoft.Jet.OLEDB.4.0;" & _
                    "Data Source=" & sDBName & ";" & _
                    "Jet OLEDB:Engine Type=5")
            catArch = Nothing
            MessageBox.Show("done")
    End Sub

this code is working on new project but not working on my original project and always generate above error. What could be the problem?

0

The mostly likely reason for this failure is that you're developing the program as a 64-bit application. The Jet OLEDB driver is 32-bit only.

So, from visual studio, just use the "Configuration Manager" to change the "platform" to x86.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.