I have a VB program(dll) that is creating an access object using
CreatObject(Access.Application). The VB prgram runs fine from the DOS command prompt. But when I scheduled it to run as SQL server job(Via Sql Server 2000 Enterprie Manager) I got error in the log file(generated by VB program) :
Can't create object Access.Application
Please help me what permission do I have to have to run the vb prgram via sql server.
Note : Both SQL Server and Agent services are running as a domain user that have Administrator priv to the local machine.
I have also tried to run these services as a local user(with admin priv). But same results.
I would be obliged if you guys help me with your expert ideas.
Thanks in advance.
When you run the vb app and it runs successfully do you run it on your local machine or on the machine that contains sql server ? Does the reference that you use in the vb project for access exist on the machine that has sql server ? Is your vb application an exe or dll (I know you mention dll originally but I wanted to clarify) ? Have you tried creating a vb app that references any other object ?
Actually I have one VB exe that is calling another VB dll and the object reference (access.application) is being made in the dll. I ran the job successfuly on the same server where I keep SQL server database. Also the object is created on the same machine. And I have installed Access too on that machine.
I am wondering if we need some special priviliges for just for SQL Server Agent.
I found the solution. I was using the same account to start sql server and sql agent services as with I logged on Windows(and that account was under local admin group). But when I selected "system account(instaed of this account)" the job ran fine.
Theoratically both account are same but don't know why the job dodsnt work when I mention user id explicitly.
Can anyone explain??? (or this is just a matter of STUPID technology).