ID: Q108714
2.50 2.50a 2.50b | 2.50
WINDOWS | MS-DOS
The information in this article applies to:
In FoxPro 2.5, 2.5a, and 2.5b for Windows and FoxPro 2.5 for MS-DOS, if you have a calculated field in a BROWSE that calls a user-defined function (UDF), and the UDF performs an SQL SELECT command with a nonexistent column name, you correctly get the "SQL Column Not Found" error. If you choose the Cancel button, the program closes, but if you choose the Ignore button, you get dumped out of the program with a "Use of transgressed handle" error message in FoxPro for MS-DOS or a general protection (GP) fault in FoxPro 2.5 for Windows. In FoxPro 2.5a and 2.5b for Windows, the program enters a continuous loop until you select another option.
Microsoft has confirmed this to be a problem in FoxPro versions 2.5, 2.5a, and 2.5b for Windows and FoxPro 2.5 for MS-DOS. This problem was corrected in FoxPro 2.5a for MS-DOS and in FoxPro 2.6 for Windows.
In FoxPro versions 2.5a and later for MS-DOS, you will be able to continue the program when you choose the Ignore button.
The following program demonstrates the problem:
*Test.prg
USE (SYS(2004)+"FoxHelp") AGAIN
BROWSE FIELDS Topic, Details, Class,;
KaBoom=KaBoom(ALIAS())
RETURN && won't get this far
FUNCTION KaBoom
PARAMETERS lcTopic
* Column BogusCol does not exist.
SELECT BogusCol FROM FoxHelp INTO ARRAY aTemp;
WHERE Topic = m.lcTopic
*RETURN IIF(_TALLY==0, "", aTemp[1]) && FoxPro has an
* "insufficient memory" error if using this line - after
* "not defined" error
RETURN IIF(_TALLY==0, "", "something") && FoxPro will GPF on this line
** end
Additional reference words: FoxDos FoxWin 2.50 2.50a 2.50b buglist2.50
buglist2.50a
buglist2.50b fixlist2.50a gpf transgressed handle errmsg err msg
fixlist2.60
KBCategory:
KBSubcategory: FxprgSql
Keywords : kberrmsg FxprgSql
Version : 2.50 2.50a 2.50b | 2.50
Platform : MS-DOS WINDOWS
Solution Type : kbfix
Last Reviewed: May 22, 1998