• MS SQL Server: run external program

    From Ammammata@21:1/5 to All on Thu Jul 29 10:43:20 2021

    I'm trying to run MS Access runtime, with my procedure and an additional parameter

    the command line is
    MSACCESS.EXE c:\Sviluppo\QCT\QCT1000.mdb ;255

    without path, being it already included in the PATH variable

    this command works fine when I use the "Run" window

    when I try this command from within MSSMS

    EXEC xp_cmdshell 'MSACCESS.EXE c:\Sviluppo\QCT\QCT1000.mdb ;255';

    I get the error:

    'MSACCESS.EXE' is not recognized as an internal or external command,
    operable program or batch file.

    If I include the path in the command line

    EXEC xp_cmdshell '"C:\Program Files\Microsoft Office\Office16\MSACCESS.EXE" c:\Sviluppo\QCT\QCT1000.mdb ;255';

    it goes into a loop and I have to kill MSSMS to exit

    Note that I'm not sure how to use "" because of the space in the path
    between words Microsoft and Office

    Any suggestion is welcome

    /-\ /\/\ /\/\ /-\ /\/\ /\/\ /-\ T /-\
    -=- -=- -=- -=- -=- -=- -=- -=- - -=-
    ........... [ al lavoro ] ...........

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)