Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with VFP on Terminal Services
Message
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Problem with VFP on Terminal Services
Miscellaneous
Thread ID:
01122489
Message ID:
01122489
Views:
77
I have a client that is experiencing an error 1957 when printing a report in a program running under Terminal Services. 1957 is "Error accessing printer spooler." Here's the code that's being executed:
TRY 
   SET PRINTER TO NAME (PrinterName)
CATCH
   SET PRINTER TO NAME GETPRINTER()
ENDTRY


Prior to this code I've used the GETPRINTER function to let the user select a printer and I'm storing it in the PrinterName variable. Originally, there was no TRY..CATCH code. What I did was add that code so that if the first SET PRINTER command threw an error, I could try a different approach and put the call to GETPRINTER right in the SET PRINTER command. Strangely, this fixed the problem, but I try to clean up afterwards and reset the printer to what was originally selected. Unfortunately, that code (SET PRINTER TO (OrigPrinter)) is sometimes throwing an error. I haven't been able to recreate this, but the users are definitely getting it. Anyone know of an issue such as this with VFP under Terminal Services? It's intermittent and may be related to specific user accounts.

Russell Campbell
eCost.com continues to rip people off
Check their rating at ResellerRatings.com
Next
Reply
Map
View

Click here to load this message in the networking platform