vb.net - MSAccess not opening database when started using System.Diagnostics.Process.Start() -
i having trouble start access database (msaccess.mdb) programmatically using system.diagnostics.process.start().
this scenario:
- vb.net aspx page starts [installpath]\cmd\erpimport.exe
- erpimport.exe reads settings sql server db (pgmname, params, execdir) uses again process.start() start batch file [installpath]\cmd\import.cmd
- import.cmd contains these 3 lines:
g: cd \esvonix "c:\program files (x86)\microsoft office\office14\msaccess.exe" "g:\esvonix\esvonix.mdb" /runtime
the esvonix.mdb programmed start data manipulation in startforms onopen event. startform set in db settings.
now strange part:
- if start import.cmd double click windows explorer fine
- if start erpimport.exe (with connection string parameter expects) command line works fine
but: if start erpimport.exe within vb.net page, start import.cmd correctly , import.cmd start msaccess.exe (as can see in taskmgr). however, access not open database (no ldb file created) , not start processing. "hangs around" in taskmgr 0 cpu time used. after killing msaccess.exe taskmgr rest works fine again: import.cmd completes, erpimport completes, aspx page shows result.
i have tried large number of different settings in process.startinfo, result same, regardless of settings.
any ideas welcome. thanks
after changing full office installation access runtime problem persisted, without /runtime parameter in call access. however, problem disappeared , access called , processed correctly command line switch /save after database name in command line.
update - solved unfortunately /safe parameter (requesting access start in safe mode) did not fix problem. process did run once after adding parameter , went previous behaviour.
the solution change applicationpool settings "loaduserprofile = true". there number of questions on dealing parameter. exact reason in case not clear, if works ...
update july 11, 2017 same problem in different user environment. time windows 2012 server. setup worked combination of /safe parameter when calling msaccess.exe , setting application pool loaduserprofile=true (in advanced settings)
Comments
Post a Comment