Microsoft KB Archive/269577

= BUG: Cannot Cancel Execution of Command/Recordset Through the Shape Provider =

Article ID: 269577

Article Last Modified on 5/8/2003

-

APPLIES TO


 * Microsoft Data Access Components 2.5
 * Microsoft Data Access Components 2.6
 * Microsoft Data Access Components 2.7

-



This article was previously published under Q269577



SYMPTOMS
When you are using the Shape Provider, it is not possible to cancel an asynchronous operation.



CAUSE
The data Shape Provider does not pass the Cancel on to the underlying provider.



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



Steps to Reproduce Behavior
 Start Visual Basic and create a Standard EXE project. Form1 is created by default. On the Project menu, click to select References, and set a reference to the Microsoft ActiveX Data Objects 2.5 Library.  Paste in the following code into the Form Load Sub: Dim conn As New Connection Dim rs As New Recordset

conn.Open &quot;Provider=MSDatashape&quot; & _ &quot;;Data Provider=sqloledb&quot; & _ &quot;;Data Source=&quot; & _ &quot;;User ID= ;Password= ;&quot; 'Using No Shape Provider works conn.Open &quot;Provider=sqloledb&quot; & _ &quot;;Data Source=&quot; & _ &quot;;User ID= ;Password= ;&quot;

Debug.Print Debug.Print Timer rs.Open &quot;select * from sysobjects, syscomments, sysindexes&quot;, conn, adOpenStatic, adLockOptimistic, adAsyncExecute Debug.Print &quot;Attempting to Cancel &quot; & Timer rs.Cancel Debug.Print &quot;Cancel finally executed&quot; & Timer Debug.Print &quot;state: &quot;, rs.State Debug.Print &quot;observe how long it takes to carry out the Cancel&quot;  Save and run the project. Note how long it takes to move beyond the Cancel call.NOTE: The query may never cancel due to low virtual memory that may cause the application to stop responding.</ol>

Keywords: kbbug kbpending KB269577

-

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

© Microsoft Corporation. All rights reserved.