Microsoft KB Archive/148838

{| = BUG: "Variable _WIN not found" Error When Running Genxtab.prg =
 * width="100%"|

ID: Q148838

2.60a WINDOWS

The information in this article applies to:


 * Microsoft FoxPro for Windows, version 2.6a

SYMPTOMS
When Genxtab.prg encounters an error, FoxPro returns the error message:

Variable '_WIN' not found

CAUSE
When Genxtab.prg encounters an error, it executes its own error handling procedure. Inside the error procedure it tests to see which operating system is being used. To test the operating system, Genxtab.prg uses the incorrect memory variable _WIN to test the system. The correct memory variable to use should be _WINDOWS. The variable _WIN doesn't exist, so when FoxPro encounters _WIN, it returns the error message:

Variable '_WIN' not found

RESOLUTION
Open Genxtab.prg (located in the directory where FoxPro resides), and search for _WIN. You should find the variable in the "PROCEDURE ALERT" procedure. Replace _WIN with _WINDOWS, and then save and recompile Genxtab.prg

STATUS
Microsoft has confirmed this to be a problem in the Genxtab.prg program included in the Microsoft products listed at the beginning of this article. You can correct this problem by making the fix described in the Resolution section of this article.

Steps to Reproduce Problem
The following code causes an error in Genxtab.prg:

IF !USED("customer") USE customer ENDIF

STORE "c:\FoxPro for Windows26\GENXTAB.PRG" TO _GENXTAB

SELECT Customer.cno, Customer.state, Customer.ytdpurch; FROM Customer; GROUP BY Customer.cno, Customer.state; ORDER BY Customer.cno, Customer.state; WHERE alltrim(upper(state))="JP" INTO CURSOR SYS(2015) DO (_GENXTAB) WITH 'Query' Additional reference words: 2.60a FoxWin buglist2.60a KBCategory: KBSubcategory: FxotherGeneral Keywords         : kberrmsg FxotherGeneral Version          : 2.60a Platform         : WINDOWS
 * }