FIX: Using Graphics Method on DB Objects May Cause GPF/UAE

Last reviewed: October 30, 1997
Article ID: Q94242
2.00 WINDOWS kbprg kbbuglist

The information in this article applies to:

- Microsoft Visual Basic programming system for Windows, version 2.0

SYMPTOMS

You may receive a General Protection (GP) fault or Unrecoverable Application Error (UAE) when you try to perform a graphics method on a Database object in Microsoft Visual Basic version 2.0 for Windows.

This problem could happen under many different circumstances. There are eight graphics methods and eight database functions yielding a total of 64 different possible combinations each of which may cause a GP fault or UAE.

CAUSE

The Database functions are not designed to support graphics methods (methods that create graphics in an application). No graphics methods are mentioned in the ODBC section of the "Microsoft Visual Basic Professional Features" manual, version 2.0. However, instead of a GP fault or UAE, you should see an error message such as, "Method not applicable" or error 421.

STATUS

Microsoft has confirmed this to be a problem in Microsoft Visual Basic version 2.0 for Windows. This problem was corrected in Microsoft Visual Basic version 3.0 for Windows.

MORE INFORMATION

The following steps reproduce the problem:

  1. Start VB.EXE.

  2. Add the following code to the Form_Click event procedure of Form1:

          Dim mydb as Database
          Set mydb = OpenDatabase("NWIND", False, False, Connect)
          mydb.Print "This is a test"
    

  3. Press the F5 key to run the example, and click Form1.

The result may be a GP fault or a UAE.


Additional reference words: BugList2.00 fixlist3.00 2.00 3.00 GPF
KBCategory: kbprg kbbuglist
KBSubcategory: APrgDataODBC
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 30, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.