Microsoft KB Archive/106163

From BetaArchive Wiki

BUG: "Variable 'G_PDDRIVER' Not Found" Upon Startup

ID: Q106163

The information in this article applies to:

  • Microsoft FoxPro for MS-DOS, versions 2.5x, 2.6, 2.6a

SYMPTOMS

If a resource file containing a default printer driver setup is marked read-only, a series of error messages is generated upon startup of FoxPro and the default printer driver is not loaded.

CAUSE

This situation occurs when the following conditions are met:

  • The resource files (FOXUSER.DBF and FOXUSER.FPT) are marked read-only (usually for a multiuser purpose).
  • A default printer driver was set by choosing the Set Default button in the Printer Setup dialog box.

RESOLUTION

To work around this problem, do one of the following:

  • Add the line PDSETUP="<setup name>" to the CONFIG.FP file instead of using the Set Default button in the Printer Setup dialog box. This will result in a specific setup being loaded during startup as desired. -or-
  • Delete the default printer driver setup record from the FOXUSER.DBF and do not set a default printer driver. To access the resource file, issue the SET RESOURCE OFF command, change the attributes of the resource file so that it is not read-only, issue the USE <resource filename> command, and then issue the BROWSE command to view the records. The ID field for printer driver setups will contain "PDSETUP" and the Name field will contain the name that the specific printer driver setup was saved as. The default record will contain a hyphen (-) to the left of that name. Either mark the record for deletion or remove the hyphen, save and close the file, restore the Read-Only attribute, and set the resource to that file. -or-
  • Do not allow the sharing of a single resource file. Instead, give each user a resource file of his or her own and remove the Read-Only attribute.

STATUS

Microsoft has confirmed this to be a problem in Microsoft FoxPro versions 2.5, 2.5a, 2.5b, 2.6, and 2.6a for MS-DOS . We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

Steps to Reproduce Problem

1. From the File menu, choose Printer Setup.

2. Select the Printer Driver Setup check box.

3. Create a new printer driver or select an existing one from the list and

   choose the Set Default button to set it as the default.

4. Return to the Command window and issue the SET RESOURCE OFF command. 5. From the Filer, change the attributes of the resource file (FOXUSER.DBF

   and FOXUSER.FPT) to Read-Only.

6. Quit FoxPro. 7. Restart FoxPro.

On startup, a wait window containing "Source not available" will appear and GENPD.APP will generate a series of error messages of the form "Variable

'G_PDxxxxxxx not found. Cancel, Suspend, Ignore", and the default printer

driver will not be loaded. The DISPLAY STATUS command will reveal that the resource file remains open in work area 1 under a .TMP file alias. Issuing the SET RESOURCE OFF command will have no effect, and the SET RESOURCE TO command will result in a "File is in use" error message. The USE command will close the temporary resource file in work area 1; however, you will not have access to previously saved printer driver setups.

REFERENCES

For more information about the resource file, the CONFIG.FP file, and printer drivers, see Chapter 2, "Customizing FoxPro," in the "Installation and Configuration" manual, and Chapter 16, "FoxPro in a Multi-User Environment," and Chapter 17, "Printer Drivers," in the "Developer's Guide."

Additional reference words: FoxDos 2.50 2.50a 2.50b 2.60 2.60a buglist2.50 buglist2.50a buglist2.50b g_pddriver variable source default errmsg err msg 2.60 buglist2.60 buglist2.60a KBCategory: kbprg kbbuglist KBSubcategory:


Last Reviewed: April 18, 1995
© 1999 Microsoft Corporation. All rights reserved. Terms of Use.