Microsoft KB Archive/810215

= FIX: Intermittent Access Violation in ADO on Web Site Under Stress =

Article ID: 810215

Article Last Modified on 9/27/2005

-

APPLIES TO


 * Microsoft ActiveX Data Objects 2.7
 * Microsoft Data Access Components 2.7
 * Microsoft Data Access Components 2.7 Service Pack 1

-



SYMPTOMS
Under stress, when multiple threads are using ADO, an access violation occurs. This is most likely experienced on a busy Web server, but is not limited to that environment. This can occur even if you are not sharing ADO objects across threads.

NOTE: The problem that is discussed in this article has only been reproduced when opening ADO recordsets by using a particular undocumented syntax. See the &quot;More Information&quot; section of this article for more details. If you do not use this syntax in your code, you probably do not experience the specific problem that this article describes.'''

NOTE:'''This bug has been fixed in MDAC 2.8. For additional information about this bug and other bugs that have been fixed in MDAC 2.8, click the following article number to view the article in the Microsoft Knowledge Base:

820761 INFO: List of significant fixes that are included in MDAC 2.8



RESOLUTION
A supported fix is now available from Microsoft, but it is only intended to correct the problem that is described in this article. Apply it only to computers that are experiencing this specific problem.

To resolve this problem, contact Microsoft Product Support Services to obtain the fix. For a complete list of Microsoft Product Support Services phone numbers and information about support costs, visit the following Microsoft Web site:

http://support.microsoft.com/default.aspx?scid=fh;EN-US;CNTACTMS

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) 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 --  15-Nov-2002  03:11  2.70.9001.23      307,200  Msadce.dll 15-Nov-2002 03:11  2.70.9001.23       57,344  Msadcf.dll 15-Nov-2002 03:11  2.70.9001.23      131,072  Msadco.dll 15-Nov-2002 03:11  2.70.9001.23       53,248  Msadcs.dll 15-Nov-2002 03:11  2.70.9001.23      147,456  Msadds.dll 15-Nov-2002 01:27  2.70.9001.23      491,520  Msado15.dll 15-Nov-2002 01:27  2.70.9001.23       53,248  Msadrh15.dll 15-Nov-2002 03:11  2.70.9001.23      180,224  Msdaprst.dll 15-Nov-2002 03:11  2.70.9001.23      110,592  Msdarem.dll 15-Nov-2002 03:11  2.70.9001.23       32,768  Msdfmap.dll



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



Steps to Reproduce the Problem
This problem has been reproduced under heavy load with code that is similar to the following.

NOTE: The following code contains undocumented syntax for the Open method of the ADO Recordset. DO not use this syntax. If you use correct syntax, the problem does not occur. See the following code for the correct syntax in the code comments. Dim conn Dim rs Dim cmd

Set conn = Server.CreateObject(&quot;ADODB.Connection&quot;) conn.Open &quot;DSN=myDSN;UID=myUID;PWD=myPwd;&quot; Set cmd = Server.CreateObject(&quot;ADODB.Command&quot;) cmd.CommandType = 4 'adCmdStoredProc cmd.CommandText = &quot;byroyalty&quot; cmd.ActiveConnection = conn cmd.Parameters(&quot;@percentage&quot;) = 50 Set rs = Server.CreateObject(&quot;ADODB.Recordset&quot;)

'The following Recordset.Open syntax is NOT documented 'The problem does not occur if the following is used instead: 'Set rs = cmd.Execute

rs.Open cmd.Execute 'NOTE: this is undocumented syntax!

rs.Close conn.Close

Set cmd = Nothing Set rs = Nothing Set conn = Nothing

Keywords: kbbug kbfix kbqfe kbprb kbhotfixserver KB810215

-

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

© Microsoft Corporation. All rights reserved.