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.
| Author |
Topic |
|
JimL
SQL Slinging Yak Ranger
1537 Posts |
Posted - 2005-12-29 : 14:25:48
|
| I have a trigger that e-mails serveral persons about a job Qty change.Has Anyone done a direct output to a networked printer?I need to output that same message to a net printer.JimUsers <> Logic |
|
|
Kristen
Test
22859 Posts |
Posted - 2005-12-29 : 14:30:04
|
Output to a file and "copy" it to the network printer using its UNC name (using xp_cmdshell - or possibly using xp_cmdshell to run OSQL to run a query that will generate the appropriate output for the printer, and point the "Output" parameter at the printer's UNC?)I don't like the thought of what will happen when the Printer raises an error and its being talked-to in a trigger though ... my preference would be to use the trigger to insert rows into a "spooling" table, with a Batch number set to, say, 0; then have a scheduled task update all rows where BATCH = 0 to the "next number", and then select and output those to the printer, and if successful flag then all as "done"Batches that don't get printed, for whatever reason, can be re-visited by some other means.Just thinking out loud Jim ... Kristen |
 |
|
|
|
|
|