Microsoft KB Archive/94242

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

Article ID: 94242

Article Last Modified on 1/9/2003

-

APPLIES TO


 * Microsoft Visual Basic 2.0 Standard Edition

-



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 &quot;Microsoft Visual Basic Professional Features&quot; manual, version 2.0. However, instead of a GP fault or UAE, you should see an error message such as, &quot;Method not applicable&quot; 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:

 Start VB.EXE.  Add the following code to the Form_Click event procedure of Form1: Dim mydb as Database Set mydb = OpenDatabase(&quot;NWIND&quot;, False, False, Connect) mydb.Print &quot;This is a test&quot;  Press the F5 key to run the example, and click Form1.

The result may be a GP fault or a UAE.

Additional query words: BugList2.00 fixlist3.00 2.00 3.00 GPF

Keywords: kbbug kbfix KB94242

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.