locked
Problem with xp_cmdshell / Printing File RRS feed

  • Question

  • Hi all, i apologize if im in the wrong section, i just cant identify where to place this problem. Here i explain:

    I need to send to the printer a document after some modifications in a table, and i dont have access to the clients code, so my only chance is either to have a background app running and polling the file, or the ideal solution, do something to send the document to print from a trigger in SQL. I created a .exe file that prints and i executed it from xp_cmdshell, and it appears as a process running in task manager, but it doesnt print. I also tried creating a DLL and a function to print, but when i call the function as an extended stored procedure... It doesnt print, Also tried creating a background process that monitories a directory and print a file whenever you insert any text file in there, but when i execute it using xp_cmdshell, it appears as running in task manager but doesnt print. Every solution works fine outside SQL, it looks like the problem is whenever i try to send something to the printer.

    Im going crazy with this s!&t! If anyone can help me, or suggest another alternative to face this problem, i will be very grateful.
    I use windows xp sp3 and SQL Server 2000

    Thanks, and i apologize if im in the wrong section.
    Thursday, August 21, 2008 3:05 PM