locked
Declaring the Microsoft Jet 4.0 engine RRS feed

  • Question

  • I am trying to open an access database by using Ole.  using the following code:

    Sub OpenDBShared (str DBPath as string)

      Dim cnnDB  as oledb.connection

    'Initialize Connection object

    cnnDB = new Oledb connection

    'specify Microsoft Jet 4.0 Provider and then open the

    'database specified in the strPath variable.

    With cnnDB

           .Provider = "Microsoft.Jet.Oledb.4.0"

     

     

    The problem is that Microsoft Jet 4.0 is not in the options offered me.  Would appreciate knowing what I am doing wrong.  Thanks, Ray Holt

     

     

    Friday, May 4, 2007 6:51 PM

All replies

  •  

     

    Your complete connection string should look something like this:

     

    Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\mydatabase.mdb;User Id=admin;Password=;
     
    If you do not have the Jet oledb privider installed on your machine you can download the latest MDAC from MS here:
     
    Friday, May 4, 2007 7:53 PM
  • Hi, when I do provider = microsoft. the choices do not include the jet engine in the drop down list.  When I try to download the latest version of the jet entine I am told that it is already installed.  For some reason visual basic express code named Orcas does recognize that it is installed.  Do you have any suggestions as to what I should do?  Thanks, Ray Holt
    Friday, May 4, 2007 11:27 PM
  • SInce your question is dealing with the Orcas version...I am moving it to the VB orcas forum:
    Saturday, May 5, 2007 12:35 AM