Please note that VisualCron support is not actively monitoring this community forum. Please use our contact page for contacting the VisualCron support directly.


warrenmurray
2014-07-02T01:20:21Z
Is there any way to run an access database using the background execution context? We run a lot of reporting (generating pdf files) through access which runs fine using the foreground execution context.

Visual cron calls C:\Windows\System32\wscript.exe to execute a vb script which opens access.

The VB script is as follows:

OPTION EXPLICIT
dim fso, file_to_open, objAccess
Set fso = CreateObject("scripting.filesystemobject")
set objAccess=CreateObject("Access.Application")
file_to_open = "Q:\Reports\xxxxxx.mdb"
objAccess.OpenCurrentDatabase(file_to_open)
wscript.quit


As mentioned this works fine in the foreground, but we want to run in background as we don't want to need a user to be logged into the visual cron server at all times.

Do you have any suggestions? The VBS comes from using the windows task scheduler which is our current production process.
Sponsor
Forum information
Support
2014-07-02T07:37:58Z
Try using a Credential that has access to the mdb location (preferably a user on the mdb location). The Credential should have "Load user profile" unchecked. Then also change Q to UNC path, i.e. \\server\folder...
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
warrenmurray
2014-07-03T07:09:39Z
We have tried this and still we receive no output - it looks like access is not being invoked. We have created a new credential with local=no (and therefore loadprofile =no), changed the task to execute a local copy of access and changed the database location to UNC with no luck.

The same task, when set to run in foreground with the the same credentials, works fine.
Support
2014-07-03T07:34:34Z
Maybe you should try the Office Macro Task instead. You might run into problems with Access because of the different context it runs in (when in background).
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
warrenmurray
2014-07-11T04:59:00Z
Hi,

We've tried the office macro task but with no luck - there was no option for the access functions. Does anyone have any other thoughts? Would a COM+ wrapper around access help?


Thanks
Support
2014-07-11T05:04:29Z
Originally Posted by: warren_murray 

Hi,

We've tried the office macro task but with no luck - there was no option for the access functions. Does anyone have any other thoughts? Would a COM+ wrapper around access help?


Thanks



I recently saw another user using the Execute Task:

Command: full path to msaccess.exe
Argument /NOSTARTUP "full path to mdb"

User used a Credential that matched a user on the remote share. Try using local logon unchecked in the Credential. Also, use a UNC path (\\servername\folder\file) instead of a mapped drive.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Scroll to Top