Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Other Forums
 MS Access
 Syntax of xp_cmdshell that will run a report

Author  Topic 

Hommer
Aged Yak Warrior

808 Posts

Posted - 2005-12-12 : 16:16:51
Does anybody know the syntax of the 'command_string' in 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 ''. I know there is permission/security issues involved, but I would like to find an example of the command.

Thanks!



rockmoose
SQL Natt Alfen

3279 Posts

Posted - 2005-12-12 : 17:48:04
I don't understand, do you want a report to pop up automatically on some computer when data changes?
Seems like a very odd request.

xp_cmdshell runs on the server computer, you only want to use it for non-windowed tasks with termination.

rockmoose
Go to Top of Page

Hommer
Aged Yak Warrior

808 Posts

Posted - 2005-12-13 : 09:38:12
Can I run something like this,

xp_cmdshell '"N:\Program Files\Office 2000\Office\Access.EXE" N:\My.MDB', NO_OUTPUT

I want to print out an Access Report on the network based on the data entry on a sql table.

Do I misunderstand the xp_cmdshell?
Go to Top of Page

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2005-12-13 : 11:35:20
No, Access is a windowed application; xp_cmdshell would not be able to interact with it.

If you want to automate reports, you should look into Reporting Services.

quote:
Originally posted by Hommer

Can I run something like this,

xp_cmdshell '"N:\Program Files\Office 2000\Office\Access.EXE" N:\My.MDB', NO_OUTPUT

I want to print out an Access Report on the network based on the data entry on a sql table.

Do I misunderstand the xp_cmdshell?




CODO ERGO SUM
Go to Top of Page
   

- Advertisement -