Problem with cmdExec

  • Hi,

    I've got a big problem these days, i'm trying to execute Access 2000 using the cmdExec command from a job but doesn't work. Here is what i do :

    I create a new job > New step and select type as cmdExec.

    In command step type c:\Program Files\Microsoft Office\Office\msaccess.exe

    when I lunch the job and analyse result the job start running but cancel itself. I open processus windows and find that a msaccess.exe processus is running on the computer but nothing happen. I try to kill the processus but can't do so. So I stop the job and as I do this the msaccess.exe processus is killed.

    What i'm trying to do is really simple :

    I want to lunch msaccess.exe and open a access database that contais a macro that will do somme database operation and close access when done.

    Any help will relly be appriciate.

  • Should be doable. Access supports both autoexec and named macros as I remember, you just pass a command line switch. I'd suggest using a batch file to get it to work right, then either call the batch file directly from the job or cut/paste the line from the bat into the job. Most likely what is happening is that Access isn't closing, but is running under the context of the agent so that you can't see the UI.

    Andy

    http://www.sqlservercentral.com/columnists/awarren/

  • Thx for helping, but when i do that with a batch (*.bat) i can open access then open my database, here is my *bat file code :

    c://Progra~1/Micros~4/Office/Msaccess d:\\Export~1\TestAccess.mdb

    This works fine. But when i copy this to my job in SQL server, SQL Agent open Access but doesn't open the database.

    Any Clue ?

  • can you check the sql-agent account privileges for the access db file.

  • hi!

    sorry, but why *the hell* are you doing this? if you want to import data, why not use DTS? sorry if i got you wrong completely and didn't understand your intention ...

    best regards,

    chris.

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply