FIX: "SQL Column Not Found" Error Causes Transgressed Handle

Last reviewed: October 14, 1997
Article ID: Q108714
2.50 2.50a 2.50b | 2.50
WINDOWS          | MS-DOS
kbprg kbfixlist kbbuglist kberrmsg

The information in this article applies to:

  • Microsoft FoxPro for Windows, versions 2.5, 2.5a, and 2.5b
  • Microsoft FoxPro for MS-DOS, version 2.5

SYMPTOMS

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.

STATUS

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.

MORE INFORMATION

Steps to Reproduce Problem

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: kbprg kbfixlist kbbuglist kberrmsg
KBSubcategory: FxprgSql
Keywords : FxprgSql kbbuglist kberrmsg kbfixlist kbprg
Version : 2.50 2.50a 2.50b | 2.50
Platform : MS-DOS WINDOWS
Solution Type : kbfix


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: October 14, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.