Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printer Error calling .dll from SQL Server

Status
Not open for further replies.

pdx1ajm

Programmer
Apr 24, 2001
7
US
I've also posted this question in the SQL Server forum.

I have a vb .dll that prints a label based on properties set by the calling program. I can call the .dll succesfully from a VB Executable, but when I call it from SQL Server (msde 1.0) I get a '482 Printer Error'. This happens whether I use the .printform method or create a picture and hit the printer object with the printer.paintpicture method.

Any ideas?
 
Printer error (Error 482)


There is some problem that prevents printing. This error has the following causes and solutions:

You don't have a printer installed from the Windows Control Panel.
Open the Control Panel, double-click the Printers icon, and choose Add Printer to install a printer.

Your printer isn't online.
Physically switch the printer online.

Your printer is jammed or out of paper.
Physically correct the problem.

You tried to print a form to a printer that can accept only text.
Switch to an installed printer that can print graphics.

 
Unfortunately these do not seem to be the issue as I can switch directly from the SQL trigger call to a VB executable that does nothing but call this .dll and it will function properly.

Furthermore, if I am running the .dll from Visual studio and call it from SQL Server it will function properly.

Is it possible that Visual studio is providing some access to the printer object that it doesn't have as a stand alone .dll?

Thanks.
 
Okay, you weren't so far off after all. It turns out that SQL Server logs in as the System Account by default, which typically does not have any printers assigned to it. In one case I assigned printers to the system account and in the other I changed SQL Server to log in to my user ID. Both ways fixed the troubles.

Thank you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top