dcsimg
Results 1 to 8 of 8
  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Sep 2002
    Location
    Hendersonville , NC
    Posts
    252

    Resolved [RESOLVED] Microsoft ACE.OLEDB 12.0 provider

    Help please. I development I have no problem using this provider. When I try and deploy to customer Windows7 box I get the attached error. We have run and deployed the recommended install package "AccessDatabaseEngine " for the 12.0 set. It shows in the users GAC. I have it referenced in the project. Still error' I have attached both the called class, pgm to call the class, and a little sample xls file. Someone please help..

    Using VS 2015 to develop in.

    thanks

    gollnick
    Attached Images Attached Images  
    Attached Files Attached Files
    William E Gollnick

  2. #2
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    39,845

    Re: Microsoft ACE.OLEDB 12.0 provider

    Did you install the 32-bit or the 64-bit version of AccessDatabaseEngine?

    Is your project compiled using 32-bit (x86) or 64-bit (x64) or "guess" (AnyCPU)?


    If you have them both as 32-bit (or both as 64-bit) it will probably solve this issue.

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Sep 2002
    Location
    Hendersonville , NC
    Posts
    252

    Re: Microsoft ACE.OLEDB 12.0 provider

    Compiled as "guess" -- I'll do both at 32 ... test .. then both at 64 .... test .. I'll get back after that. Thank you..
    William E Gollnick

  4. #4
    You don't want to know.
    Join Date
    Aug 2010
    Posts
    4,580

    Re: Microsoft ACE.OLEDB 12.0 provider

    AnyCPU is no longer "guess". If you compile with AnyCPU, by default you get x86 all the time. You have to tweak the settings if you want "AnyCPU" to look at the platform and change its values.
    This answer is wrong. You should be using TableAdapter and Dictionaries instead.

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Sep 2002
    Location
    Hendersonville , NC
    Posts
    252

    Re: Microsoft ACE.OLEDB 12.0 provider

    Well.. don't know about that. The default "anycpu" did not run.
    Compiled both parts as X86 -- ran great...
    Compiled both parts at 64 -- same error
    So if you say AnyCpu ALWAYS compiles at x86 ... what was the reason original issue??
    Your other comment -- "This answer is wrong. You should be using TableAdapter and Dictionaries instead" ... is that directed at this also? If so.. what would be your solution?
    Thanks
    William E Gollnick

  6. #6
    Hyperactive Member
    Join Date
    Sep 2017
    Posts
    429

    Re: Microsoft ACE.OLEDB 12.0 provider

    Pretty much need to compile at x86 or dont use ace/jet

  7. #7
    You don't want to know.
    Join Date
    Aug 2010
    Posts
    4,580

    Re: Microsoft ACE.OLEDB 12.0 provider

    Well, to the first part, the answer may be newer than I think.

    At some point, the option "prefer x86" was added to the project settings if AnyCPU is selected. The real purpose of this flag is to tell the compiler to do something or other to enable ARM compilation. But it also has the side effect of disabling the ability to run the assembly in an x64 context. I thought it might be in 2015, but it could be even newer than that. Or, perhaps, when you tried AnyCPU you intuitively disabled that feature because it sounded like it'd be counter-intuitive.

    So it sounds like you have the x86 driver, and should set the project to always compile x86. OR: you have to install the x64 driver if you want to compile for x64.

    As for the second part, it's my signature, not a post. It's just generally what most people reply to my posts with on this forum, so I'm saving them the trouble.
    This answer is wrong. You should be using TableAdapter and Dictionaries instead.

  8. #8

    Thread Starter
    Addicted Member
    Join Date
    Sep 2002
    Location
    Hendersonville , NC
    Posts
    252

    Re: Microsoft ACE.OLEDB 12.0 provider

    Thanks..I'll mark this as resolved....
    William E Gollnick

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width


×
We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.