XL5: GP Fault If SQLRequest Results Used in Custom Function

Last reviewed: September 2, 1997
Article ID: Q113847
The information in this article applies to:
  • Microsoft Excel for Windows, version 5.0
  • Microsoft Query, version 1.0

SUMMARY

When you use the SQLRequest function in a Microsoft Excel version 5.0 worksheet to generate a numeric result set, and you then create a custom function that uses the range that contains that result set, the hourglass pointer may appear, or you may receive one of the following error messages:

   Excel caused a General Protection Fault in module EXCEL.EXE
   at 0025:12FC.

   -or-

   Excel caused a General Protection Fault in module OLE2DISP.DLL
   at 0002:3711.

WORKAROUND

If you use SQLRequest to generate a numeric result set, do not use that range of data in any subsequent macro code. For example, change the following

   Function AddMeUp(Range)
      AddMeUp = Application.Sum(Range)
   End Function

so that it does not contain references to range. For example, use the following code instead:

   Function AddMeUp(Arg1, Arg2, Arg3, Arg4)
      AddMeUp = Arg1 + Arg2 + Arg3 + Arg4
   End Function

STATUS

Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. This problem was corrected in Microsoft Excel version 7.0 for Windows 95.


KBCategory: kbprg kbtool kberrmsg
KBSubcategory: xlquery

Additional query words:5.00 SQL Request SQLREQUEST GP GPF MSQUERY hang
crash
Keywords : kbprg PgmOthr kbprg
Version : 5.00
Platform : WINDOWS
Issue type : kberrmsg


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: September 2, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.