Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

FIX: Access Violation in Msadce.dll When Using the RDS Data Control

View products that this article applies to.

This article was previously published under Q251267

↑ Back to the top


When you are using the RDS Data control, an Access Violation may occur in the Msadce.dll file. This may occur after you have sorted the recordset of the control more than one time, and then closed the client in which the control is hosted, such as Microsoft Internet Explorer or a Visual Basic client.

↑ Back to the top


A reference counting problem in Microsoft Data Access Components (MDAC) Remote Data Services Data Control (Msadco.dll) permits objects to be prematurely unloaded. The memory where the objects are loaded is being accessed by the cursor engine (Msadce.dll) during the cleanup process that happens during shutdown, which generates an Access Violation.

↑ Back to the top


Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.

This problem is fixed in Microsoft Data Access Components (MDAC) version 2.5 or later. The latest version of MDAC can be obtained from the following Microsoft Web site:

↑ Back to the top

More information

The English version of this hotfix has the file attributes (or later) 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      Version       Size            File name    
   3/17/00   2.12.5117.0   134,928 bytes   msadco.dll

Steps to Reproduce the Behavior

Paste the following code into a new Web page and save the page in the root directory for a Web site. Modify the connection string and query in the Init() subroutine to values that work at the installation site of the page. Make sure that the User ID has the appropriate permissions to perform this operation on the database.
<TITLE>Microsoft Knowledge Base Sample Code:  Q251267</TITLE>
	Sub Init()
		' Load a sorted recordset into the Data Control...
		rs.CursorLocation = 3
		rs.Open "SELECT au_fname FROM authors", "Provider=SQLOLEDB.1;Data Source=MyServer;
                  Initial Catalog=pubs;UID=<username>;pwd=<strong password>;"
		rs.Sort = "au_fname"
		Set dc.SourceRecordset = rs
	End Sub
	Sub Button1_OnClick()
		' Clear the Data Control's recordset property...
		Set dc.SourceRecordset = Nothing
		' Unhide second button and hide first one... = "inline" = "none"
	End Sub
	Sub Button2_OnClick()
		' Assign the existing recordset back to the Data Control...
		Set dc.SourceRecordset = rs
		' Hide second button and inform user that IE will now crash... = "none"
		Span1.innerHTML = "If your MDAC version is earlier than 
                2.5, IE will crash when you navigate away from this page 
                or close the browser. "
	End Sub
<BODY OnLoad="Init">
<OBJECT ID="rs" CLASSID="clsid:00000535-0000-0010-8000-00AA006D2EA4" HEIGHT=0 WIDTH=0></OBJECT>
<OBJECT ID="dc" CLASSID="clsid:bd96c556-65a3-11d0-983a-00c04fc29e33" HEIGHT=0 WIDTH=0></OBJECT>
<INPUT TYPE="BUTTON" ID="Button1" VALUE="Empty Data Control">
<INPUT TYPE="BUTTON" ID="Button2" VALUE="Reload Data Control" STYLE="{display:none;}"> 
<B><SPAN ID=Span1></SPAN> 
<TABLE ID=Table1 DATASRC="#dc" >
	<TR><TD><SPAN DATAFLD="au_fname"></SPAN></TD></TR>
Load the page in Internet Explorer on a computer with any version of MDAC prior to 2.5. Follow the instructions as you are prompted. You may be warned that the page is accessing data on another domain. This is expected. The page causes your browser to crash with the Access Violation described in the "Symptoms" section of this article.

↑ Back to the top

Keywords: kbqfe, kbbug, kbfix, kbmdac250fix, kbmdac260fix, kbmdac270fix, kbqfe, kbhotfixserver, KB251267

↑ Back to the top

Article Info
Article ID : 251267
Revision : 8
Created on : 9/26/2005
Published on : 9/26/2005
Exists online : False
Views : 411