Rock and Hard Place

Started by stanl, November 18, 2018, 09:58:38 AM

Previous topic - Next topic

stanl

Maybe this is an easy fix and I missed the previous post, or perhaps a user with a similar issue has the fix.


My WB 2018B is installed on my Win10 laptop with Office 2019 64bit installed.  From here I am attempting to compile Exe's to manipulate data tables using ACE.OLEDB provider (normally 12.0).


Not sure you can use WB Studio to test between 32/64 bit unless you compile.  That being said, if I compile as 32 bit, I cannot execute on my 64bit laptop (even with Access.Database.Tools for 2007 installed for 32 bit). I get database format (.accdb) not recognized. Compile in 64bit and all works.


But the 64bit exe fails in Win7 or Win10 with 32bit Office installed, saying the OLEDB Provider is not recognized or installed correctly. So I have to re-compile under a different exe output in 32bit and export with the 32 bit dll's.


BTW: If I compile as a large exe the dll's are not exported.... maybe already addressed.



td

WinBatch Studio has both a 32-bit and 64-bit debugger,  and a 32-bit and 64-bit run command so you can test both 32-bit and 64-bit scripts in WinBatch Studio.  You don't need to compile a script to test it with either bitness.

COM Automation servers are in-process for the most part and you cannot load 32-bit dlls into 64-bit processes or vica versa.   This means you need a 32-bit COM Automation server installed on a system to use it in 32-bit processes and a 64-bit COM Automation server installed on a system to use it with 64-bit processes.  It is possible to use COM Automation servers of bitness different from the process via either a thunking dll and/or some combination of proxy/server dlls.   This type of dll (or dlls) is specific to each COM server and is provided by the authors of the COM object.  WinBatch Studio provides 64-bit debugging services via the above even though it is 32-bit process.  Based on first-hand experience they can be tricky to write, test and maintain.  This may be why they are not used more often.

"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

stanl

Thanks.  Wasn't really ranting about WB. Just had someone contact me that I wrote something for in 2005 and wanted a code upgrade (you know the person who thinks support is free and forever). By the time you get to Office 2019 and SQL Server 2017 you have ACE.OLEDB providers for 12,14 and 15. As it turned out the good old 2007 Office pack can be installed alongside the 64 bit providers and both can function.

td

Generally, you can have a 32-bit and 64-bit version of MS Office on the same system as long as they are not the same version.  There are numerous caveats of course, and you have to watch out for potential progid collisions. 
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade