FIX: GPF in VBDB300.DLL When Use ODBC to Connect to Oracle DB
Article ID: Q124503
--------------------------------------------------------------------------
The information in this article applies to:

 - Professional Edition of Microsoft Visual Basic for Windows, version 3.0
--------------------------------------------------------------------------

SYMPTOMS
========

When trying to use ODBC with Visual Basic for Windows to get table
information from an Oracle database, you may receive the following error
message:

   An error has occurred in your application...

When you choose the Close button, the following general protection (GP)
fault error message appears:

   VB caused a GPF in module VBDB300.DLL at 000A:1B0F

If you choose Ignore, your application may continue to run as expected.

CAUSE
=====

It appears that this GP fault is caused within the file VBDB300.DLL by an
incompatibility with specific network configurations. However, neither
Microsoft nor Oracle have been able to duplicate this problem.

The problem has been reported to occur with both Oracle 6 and Oracle 7 on a
variety of network software with a variety of network protocols. There is
no one specific network or protocol that reproduces the problem.

WORKAROUND
==========

The following workaround has been found to be successful if in addition to
Visual Basic, you also have both Microsoft Access version 2.0 and the
Microsoft Access 2.0/Visual Basic 3.0 Compatibility Layer installed:

In the VB.INI or <appname>.INI file (see page 148 of "Professional Features
book 2"), add the following to the [ODBC] section (create one if needed):

   [ODBC]
   AttachableObjects='TABLE'

For more information about this .INI file entry, please see the Help menu
in Microsoft Access version 2.0. Search for "INI Files," and select the
"Customizing MSACC20.INI Setting" topic.

For additional information about the Compatibility Layer and how to get it,
please see the following article in the Microsoft Knowledge Base:

   ARTICLE-ID: Q113951
   TITLE     : How to Obtain & Distribute the Compatibility Layer

STATUS
======

This bug was corrected in Microsoft Visual Basic version 4.0 for Windows.

MORE INFORMATION
================

Steps to Reproduce Problem
--------------------------

If you have a network configuration on which the problem does occur, the
following piece of code will demonstrate the problem:

   Sub Command_Click()
      Dim db as Database
      Dim ds as Dynaset
      Set db = OpenDatabase("", 0, 0, "ODBC;")

      ' You will be prompted for the ODBC server information.
      Set ds = db.CreateDynaset("<tablename>")
      db.TableDefs.Refresh
   End Sub

The error occurs on the last line of code where the Refresh is trying to
load the table information from the Oracle database into memory.

Additional reference words: 3.00 gpfault buglist3.00 gpf fixlist4.00
KBCategory: kbprg kbbuglist kberrmsg
KBSubcategory: APrgDataODBC
