Syntax of xp_cmdshell that will run a report

H

homer

Does anybody know the syntax of the 'command_string' in SQL Server's system
sp xp_cmdshell that will run an Access Report on the network?
For instance, I have a copy of Access in following location
C:\Program Files\Office 2000\Office\Access.EXE,
and another Mymdb.mdb file with a report name rptXYZ in it located in
C:\Program Files.
I am sure there is a way to fire up that report from sp or T-SQL, or a
trigger by EXEC xp_cmdshell 'some syntax help here '. I know there is
permission/security issues involved, but I would like to find an example of
the command.

Thanks!
 
A

Alex Dybenko

Hi,
should be something like this:
xp_cmdshell '"C:\Program Files\Office 2000\Office\Access.EXE" C:\My.MDB',
NO_OUTPUT
 
H

homer

What about report name? How do I pass that in, and is it possible to pass in
a where clause as well?

Thanks!
 
Top