Error Accessing Print Spooler Foxpro
SQL Server 2014 Express resources Windows Server 2012 resources Programs MSDN subscriptions Overview Benefits Administrators Students Microsoft Imagine Microsoft Student Partners ISV Startups TechRewards Events Community Magazine Forums Blogs Channel 9 Documentation APIs and reference Dev centers Retired content Samples We’re sorry. The content you requested has been removed. You’ll be auto redirected in 1 second. Ask a question Quick access Forums home Browse forums users FAQ Search related threads Remove From My Forums Answered by: VFP 9.0 Printer Setup in app created gives error 1957 Visual FoxPro > Visual FoxPro General Question 0 Sign in to vote I've created an app that every time I try to use the Printer Setup from File I get an error after selecting anohter printer, "Error 1957,0 Error accessing printer spooler" but it will print to the new printer selected. Also I can not use the Getprinter() function in any of my forms or I get the same error message and it does not print to the printer selected. Tuesday, March 23, 2010 7:20 PM Reply | Quote Answers 0 Sign in to vote There is a bug in VPF9 after discussing it with a Microsoft help person and them investigating it. Can't believe it was not caught till now. I kept thinking I was doing something wrong especially since it is the same code used in VFP6. It only happens when you use the Wizard to create a new project. He said to replace the default menucommand under File- Printer Setupwith do fix_print.prgand of course include the fix_print.prg in your code tab in the project. fix_print.prg * Beginning of program LOCAL lcPrinter
lcPrinter = '' lcPrinter = GETPRINTER() IF !EMPTY(lcPrinter) SET PRINTER TO NAME (lcPrinter) ENDIF * * End of program Proposed as answer by James Frye Monday, June 28, 2010 12:14 AM Marked as answer by Ed Price - MSFTMicrosoft employee, Owner Thursday, May 24, 2012 8:04 PM Tuesday, June 15, 2010 10:52 PM Reply | Quote 0 Sign in to vote OK my bad - it was late. My point is that if you kndata files and how to check what is happening → Visual FoxPro - Fix for Error accessing printer spooler (Error: 1957) 14. February 2014 Admin Visual FoxPro (0) Had the following error appear on a Visual FoxPro Application running under Citrix:- Error Number: 1957 Error message: Error accessing printer spooler. I found out that this error was caused because sometimes FoxPro cannot determine the default printer. So a work around https://social.msdn.microsoft.com/Forums/en-US/fcf49c45-15af-447b-b690-d64921cff66c/vfp-90-printer-setup-in-app-created-gives-error-1957?forum=visualfoxprogeneral was to use the winspool.drv and force FoxPro to the Default Printer name. Example code as follows (I am defaulting to Win2PDF if no printer is found as this is installed on all our Citrix clients):- PUBLIC cDefaultPrinter UseStdPrintDefault() SET PRINTER TO NAME (cDefaultPrinter) REPORT FORM "TestReport.frx" abortion with a pill TO http://celticcodingsolutions.com/Blog/post/2014/02/14/Visual-FoxPro-Fix-for-Error-accessing-printer-spooler-(Error-1957).aspx PRINTER PROMPT NOCONSOLE PROCEDURE UseStdPrintDefault DECLARE INTEGER GetDefaultPrinter IN winspool.drv; STRING @ pszBuffer,; INTEGER @ pcchBuffer abortion effects &&Return default printer name nBufsize = 250 cPrinter = REPLICATE(Chr(0), nBufsize) = GetDefaultPrinter(@cPrinter, @nBufsize) cDefaultPrinter = SUBSTR(cPrinter, 1, AT(Chr(0),cPrinter)-1) lnPrinterCount = APRINTERS(oPrinters) FOR lnPCount = 1 TO lnPrinterCount IF oPrinters[lnPCount,1] = 'Win2PDF' SET PRINTER TO NAME "Win2PDF" ENDIF ENDFOR RETURN ENDPROC Tags : Related posts Visual FoxPro - Fix for Error accessing printer spooler (Error: 1957) Had the following error appear on a Visual FoxPro Application running under Citrix:- Error Number: ... Visual FoxPro - don't add config.fpw to project So I built a nice Visual FoxPro application (yep I still like to dabble with FoxPro for i simple tex... Visual Studio 2015 and NuGet redirection and package retrieval errors Using Visual Studio 2015 and trying to get a package from NuGet I was getting 2 errors:-Install-Pack Comments are closed About the author
Accessing Printer Spooler Mike Gagnon Error Accessing Printer https://www.foxite.com/archives/error-accessing-printer-spooler-0000327146.htm Spooler Subject: RE: Error Accessing Printer Spooler Thread ID: http://www.tech-archive.net/Archive/Fox/microsoft.public.fox.programmer.exchange/2004-05/0422.html 327142 Message ID: 327146 # Views: 45 # Ratings: 1 Version: Visual FoxPro 9 Category: Reports and Printers Date: Wednesday, November 16, 2011 12:07:31 PM This message was rated by: Ankur error accessing Joshi # Ratings: 1 > Dear Experts,> > I am facing a problem with the following> > mprintrepo = "microsoft xps document writer" > set printer to name mprintrepo > > Produces the error "error accessing printer spooler"> > whereas > set printer to name error accessing print "microsoft xps document writer" works fine.> > > (microsoft xps document writer - printer is installed at the current PC)> I have also tried set printer to name &mprintrepo but in vain> > Please guide> > > > Ankur Joshi*INITIALIZE THE SET PRINTER COMMAND SET PRINTER TO DEFAULT *NOW ISSUE THE REAL SET PRINTER... SET PRINTER TO "&mprintrepo" or SET PRINTER TO NAME "&mprintrep" Mike GagnonRefox XI +(English version) ENTIRE THREAD Error Accessing Printer Spooler Posted by Ankur Joshi @ 11/16/2011 11:39:50 AM RE: Error Accessing Printer Spooler Posted by Mike Gagnon @ 11/16/2011 12:07:31 PM RE: Error Accessing Printer Spooler Posted by Ankur Joshi @ 11/16/2011 4:28:24 PM RE: Error Accessing Printer Spooler Posted by Martin Krivka @ 11/16/2011 2:34:46 PM RE: Error Accessing Printer Spooler Posted by Ankur Joshi @ 11/16/2011 4:24:54 PM
fields on grids" In reply to: Jim Robb: "Re: Error Accessing Printer Spooler via FoxPro program" Messages sorted by: [ date ] [ thread ] Date: Mon, 10 May 2004 14:21:41 GMT Hi Jim: I have seen problem like this when the report contain "old" printer information in the Expr, Tag, and Tag2 fields of the report. You might want to make a copy of the report and then remove the information from these fields using VFP. Here is an article that shows you how to do this task: 138396 HOWTO: Use the Default Windows Printer in Visual FoxPro http://support.microsoft.com/?id=138396 I hope this helps. This posting is provided "AS IS" with no warranties, and confers no rights. Sincerely, Microsoft FoxPro Technical Support Lee Mitchell *-- VFP8 HAS ARRIVED!! --* Read about all the new features of VFP8 here: http://www.universalthread.com/VisualFoxPro/News/VFP8Release.asp Purchase VFP8 here: http://shop.microsoft.com/Referral/Productinfo.asp?siteID=11518 Keep an eye on the product lifecycle for Visual FoxPro here: http://support.microsoft.com/default.aspx?id=fh;[ln];lifeprodv - VFP5 Mainstream Support retired June 30th, 2003 - VFP6 Mainstream Support retires Sept. 30th, 2003 Rick, Yes I do have a "lp laserjet etc". We did a reformat and clean install. The XP equivalent driver was probably used. We are going to upgrade to version 8 and yes we are SP3. Do you think that will solve the problem? I am not a FoxPro programmer and have been given this system to maintain. There's not much documentation either so I'm learning as I go along. Thanks, Jim. ----- Rick Bean wrote: ----- > Jim, > First the obvious question - Do you have a printer installed on the system that is named "hp >laserjet series II"? > When you say "upgraded", is this the same physical machine? > If yes: > Do you do an upgrade over a previous OS? > Did you reformat and do a clean install of XP? > If no: > Did you reinstall the "old" LJ II driver, or go with the MS XP equivalent? > If you are upgrading hardware/OS to XP, why not "upgrade" VFP 5.0 to VFP 8.0+? (Are you >at least running 5.0a SP3?) > Rick > "Jim Robb"