Link to home
Start Free TrialLog in
Avatar of sbornstein2
sbornstein2

asked on

SQL Job launching Access Database issue

I type in the Run window

"C:\Program Files\Microsoft Office\Office\MSACCESS.EXE" "C:\AutoReports\MyDB.mdb"

and the database opens fine.  I created a SQL job and selected Operating System Command and pasted that in and it does not work.  It hits my CD drive for some reason then never opens anything.  Any idea all?
Avatar of rafrancisco
rafrancisco

As far as I know, you cannot open another application from a SQL job.
Avatar of sbornstein2

ASKER

Oh you definatly can.  I did this at other jobs I just forget what is causing this issue.
I SQL jobs that would run

"C:\Program Files\Microsoft Office\Office\MSACCESS.EXE" "C:\AutoReports\MYDB.mdb" /x "Autoexec1"


and it would fire off an autoexec call and close the DB.
What I am trying to say is, you cannot open another application that will show a GUI screen from a SQL job.
ok hat might be the case but I know I had this working from another SQL Server at my work once we used to run automated jobs.  If I pass in:

"C:\Program Files\Microsoft Office\Office\MSACCESS.EXE" "C:\AutoReports\MYDB.mdb" /x "Autoexec1"

I would have a macro that would run and then run an SMTP job and then the last line would quit access and then the job would stop without issue.  I think this might be a security issue or something maybe.
>> I think this might be a security issue or something maybe <<

This could very well be the reason.
It might be more reliable to reproduce your SMTP code in VBScript, then just run an ActiveX job. Then you dont need Access installed on the server.
I have things in the Access database like Subject, Body in tables to make automated reports pretty easy.   I know this works but I dont know why its hitting my A: Drive actually and not running the macro or opening the DB.  There are no forms etc that open in the DB its the exact database I used before at my job that worked with this call from SQL job.
ASKER CERTIFIED SOLUTION
Avatar of nmcdermaid
nmcdermaid

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial