c# - MDAC OLEDB Command Prompt 32-Bit Problem -
a couple years ago wrote c#.net program used microsoft ace , jet oledb convert excel spreadsheets csv files. upgraded windows server 2008 x64 server. since jet deprecated method no longer worked. .xls files excel 2003 handled jet , .xlsx excel 2007 files handled ace. changed connection strings use ace both.
we can run program through command prompt. however, when use our automation software (which apparently runs program similar start->run method), error saying microsoft data access components not installed. upon researching these, appears work on 32-bit systems , don't support above windows server 2000.
any ideas? have newest beta x64 ace oledb drivers installed. program runs fine manually. i've tried compiling program target platform of x86. manually ran program using windows account automation software uses.
on 64-bit windows, process defines bitness: 32 or 64.
if start program in 64-bit mode, , program com (oledb com-based), com 64 bits dll (in fact, uses 64-bit side of registry whe 64-bit com components registered).
if start program in 32-bit mode, , program com, com 32 bits dll only.
now, can depend on version of c# compiler, today, c# program configured compiled "any cpu". means run 32 on 32-bit os , 64 on 64-bit os, makes things quite complicated if use com directly or indirectly (sometimes, don't know you're using com!).
so... sum up:
1) determines bitness of process (easy task manager, 32-bit processes on 64-bit machine suffixed "*32").
2) install corresponding com oledb drivers.
if oledb drivers not exists in 64-bit mode, you'll have recompile c# .exe or patch force 32-bit mode. can use corflags tool this.
Comments
Post a Comment