FIX: Access violation in RepODBC.dll when you try to connect to repository (304716)



The information in this article applies to:

  • Microsoft Visual Basic Professional Edition for Windows 6.0
  • Microsoft Visual Basic Enterprise Edition for Windows 6.0
  • Microsoft SQL Server 2000 (all editions)

This article was previously published under Q304716

SYMPTOMS

When you try to connect to a Microsoft repository database that does not exist, an access violation may occur. The error message indicates that the instruction at address "0x0340E4AC" tried to read the memory at address "0x00000000".

The specific instruction address may vary depending on the location from which the RepODBC.dll file is loaded.

CAUSE

When a connection to the repository is requested, a repository object is created to try the connection process. This object tracks the status of the connection and any transactions on the connection.

If the connection to the repository is not successful, the repository returns a status that indicates that the requested object model does not exist, and the destructor for the repository object is called. The destructor of the repository object examines the status of the connection for any open transactions and ends those transactions before it exits.

Because of a bug during the initialization of the repository object, the database transaction state is not correctly initialized to None. If the memory that is allocated to the transaction state variable in the repository object has an initial value of Running (because of previous values in the allocated memory), the destructor tries to end the transaction before exiting. Because a connection is never established, the connection pointer is not valid. Therefore, the attempt to end the transaction causes a read of an invalid memory address.

RESOLUTION

A supported hotfix is now available from Microsoft, but it is only intended to correct the problem that this article describes. Apply it only to systems that are experiencing this specific problem.

To resolve this problem, contact Microsoft Product Support Services to obtain the hotfix. For a complete list of Microsoft Product Support Services telephone numbers and information about support costs, visit the following Microsoft Web site:Note In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question. The English version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in coordinated universal time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time tool in Control Panel.
   Date         Time   Version        Size        File name
   -------------------------------------------------------------
   17 July 2001 14:51  2000.0.1198.0  1,232,969   RepODBC.dll
				

Note Because of file dependencies, the most recent hotfix or feature that contains these files may also contain additional files.

STATUS

Microsoft has confirmed that this is a bug in the Microsoft products that are listed in the "Applies to" section.

Modification Type:MinorLast Reviewed:10/19/2005
Keywords:kbbug kbfix kbQFE KB304716 kbAudDeveloper