The EntitySpaces Community

Share and learn about the EntitySpaces Architecture.
Welcome to The EntitySpaces Community Sign in | Join | Help
in
Home Forums Photos

MS Access Provider on Vista

Last post 10-25-2007, 6:59 PM by pocketscholar. 9 replies.
Sort Posts: Previous Next
  •  02-16-2007, 6:57 AM 338

    MS Access Provider on Vista

    Any thoughts on how I may get the MS Access provider to work on a Vista machine?

    I get an error: The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine.

    MyGeneration connection string is:

    Provider=Microsoft.Jet.OLEDB.4.0;User ID=Admin;Data Source=F:\myAccessDb.mdb;Persist Security Info=False

    and MyG has no problem connecting to the db.

  •  02-16-2007, 7:04 AM 340 in reply to 338

    Re: MS Access Provider on Vista

    Tried this without success: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=125207&SiteID=1 (There is not a 64 bit version of jet that is why you get that error.  To force your app to use the 32 bit change the target cpu to x86 in the advanced compiler options.)

    If I do this I get an error:

     Server Error in '/' Application.


    Could not load file or assembly 'ClubsWS' or one of its dependencies. An attempt was made to load a program with an incorrect format

  •  02-16-2007, 7:36 AM 342 in reply to 340

    Re: MS Access Provider on Vista

    The 5 dlls referred to in the thread were not on my Vista 64 machine so I copied them from another and tried registering:

    msjet40.dll
    msjetoledb40.dll
    msjint40.dll
    msjter40.dll
    msjtes40.dll
    mswstr10.dll

     

    Some would not register:

    msjint40
    msjter40
    mswstr10

    Error: "The module ... was loaded but the entry-point DLLRegisterServer was not found."

    Am I dead in the water trying to use MS Access on a dev box using Vista 64?

    EDIT: this refers to the dlls http://support.microsoft.com/kb/278604 

  •  02-16-2007, 8:06 AM 344 in reply to 342

    Re: MS Access Provider on Vista

    Well, this is why I am staying far away from Vista for a while, XP Pro is too stable to be upgrading, however, it sounds to me like you need to install the latest MDAC from Microsoft? We do have folks using MyGeneration just fine on Windows Vista.

    Try this: Uncheck the verification for mdac 2.7 when installing MyGeneration.

    However, it sounds like MDAC or something is missing from your machine. 


    EntitySpaces | Twitter | BLOG | Please honor our Software License
  •  02-16-2007, 8:10 AM 345 in reply to 344

    Re: MS Access Provider on Vista

    MDAC will not install on Vista. MyGeneration will only install if verification for MDAC is unchecked.

    I guess I wondered how MyGeneration can read the mdb but the resulting EntitySpaces class cannot.

    My solution is to move this project to an XP box but thought I'd post here to see if anyone had a solution but also to warn others.

     

  •  02-16-2007, 8:17 AM 346 in reply to 345

    Re: MS Access Provider on Vista

    Is there a sample for <configurationInfo ... /> for the MS Access provider?
  •  02-16-2007, 3:09 PM 353 in reply to 346

    Re: MS Access Provider on Vista

    The app.config in the EntitySpacesDemo shows how to use both SQL Server and Access in multi-provider mode. If Access is the only db you are generating against, then it would look like below. (I added some line breaks in the connection string for readability.)

    Code:
    <EntitySpaces>
      <connectionInfo default="ACCESS">
        <connections>
          <add name="ACCESS"
            providerMetadataKey="esDefault"
            sqlAccessType="DynamicSQL"
            provider="EntitySpaces.MSAccessProvider"
            providerClass="DataProvider"
            connectionString="Provider=Microsoft.Jet.OLEDB.4.0;
              User ID=Admin;
              Data Source=C:\Databases\NorthwindOffice2003.mdb;
              Persist Security Info=False"
          />
        </connections>
      </connectionInfo>
    </EntitySpaces>

    The configSections is the same for all EntitySpaces providers.


    David Neal Parsons
    www.entityspaces.net
  •  10-25-2007, 9:39 AM 6065 in reply to 353

    Re: MS Access Provider on Vista

    It seems like you need to define your connections and connection strings prior to calling the LoaderMT.

     

    I have a case were I need to allow the user to point to different Access databases from our field loacations. The databases all have the same format, but may exist in different directories. So what I need is to set up a connection on the fly.

     

    Is this possible?

     

    Jamie

  •  10-25-2007, 1:56 PM 6071 in reply to 6065

    Re: MS Access Provider on Vista

    I'll try to answer your questions, but if you need further information, please start a new thread. Hijacking older threads can make a discussion difficult to follow, and requires re-reading a lot of old material trying to determine what may, or may not, be relevant.

    The Loaders only deal with setting up the providers, I'm not sure why specific configuration setup would come in to play. In our SqlCe test app we register the LoaderMT first, then manually register our connections immediately afterwords. As you can see in the "Getting Started" PDF DNN Configuration section, the connections are setup first, then LoaderMT is registered. Both implementations work fine. The primary restriction is that a Loader must be registered before you attempt to use any of the generated EntitySpaces business objects.

    One solution to accessing different databases is demonstrated in the EntitySpaces Demo. A search of the forums should turn up some alternatives, depending on your exact needs.

    In the Demo, you can choose from any of four databases from a menu option at runtime. Full source is included, so you can see how this was accomplished using obj.es.Connection.Name. In your case, all of the connections in your config file would be the same except for the name and the connectionString. Since your databases all use the same provider and schema, you would not need to run the MetadataMaps like the demo. Just run the Generated Master against one of the databases, and make sure that the providerMetadataKey for all the connections in your config file is for "esDefault".

    Code:
    < add name="AccessDev"
        providerMetadataKey="esDefault"
        sqlAccessType="DynamicSQL"
        provider="EntitySpaces.MSAccessProvider"
        providerClass="DataProvider"
        connectionString="Provider=Microsoft.Jet.OLEDB.4.0;
          User ID=Admin;
          Data Source=C:\Databases\NorthwindDev.mdb;
          Persist Security Info=False"
    >
    
    < add name="AccessProd"
        providerMetadataKey="esDefault"
        sqlAccessType="DynamicSQL"
        provider="EntitySpaces.MSAccessProvider"
        providerClass="DataProvider"
        connectionString="Provider=Microsoft.Jet.OLEDB.4.0;
          User ID=Admin;
          Data Source=C:\Databases\NorthwindProd.mdb;
          Persist Security Info=False"
    >

    David Neal Parsons
    www.entityspaces.net
  •  10-25-2007, 6:59 PM 6083 in reply to 6071

    Re: MS Access Provider on Vista

    Thanks. That helps.

     Sorry about the hijack. You are right.

View as RSS news feed in XML