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



The information in this article applies to:

  • Microsoft Visual Basic Standard Edition for Windows 2.0

This article was previously published under Q94242

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.

Modification Type:MinorLast Reviewed:1/9/2003
Keywords:kbbug KB94242