Microsoft Knowledge Base Email Alertz

(269577) - When you are using the Shape Provider, it is not possible to cancel an asynchronous operation. The data Shape Provider does not pass the Cancel on to the underlying provider. Microsoft has confirmed that this is a bug in the Microsoft products...

Search KbAlertz

Advanced Search

Receive Microsoft Knowledge Base articles by E-Mail?

Every night we scan the Microsoft Knowledge Base. If technologies you're interested in are updated, we'll send you an e-mail. You only get one e-mail a day, and only when new articles are added.

Click here to create a
FREE account
Already have an account?
[Click here to Login]











Microsoft Knowledge Base Article

This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks

Article ID: 269577 - Last Review: May 8, 2003 - Revision: 2.1

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

This article was previously published under Q269577

On This Page

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.

MORE INFORMATION

Steps to Reproduce Behavior

  1. Start Visual Basic and create a Standard EXE project. Form1 is created by default.
  2. On the Project menu, click to select References, and set a reference to the Microsoft ActiveX Data Objects 2.5 Library.
  3. Paste in the following code into the Form Load Sub:
        Dim conn As New Connection
        Dim rs As New Recordset
    
        conn.Open "Provider=MSDatashape" & _
                  ";Data Provider=sqloledb" & _
                  ";Data Source=<server_name>" & _
                  ";User ID=<uid>;Password=<pwd>;"
        
        'Using No Shape Provider works
        conn.Open "Provider=sqloledb" & _
                  ";Data Source=<server_name>" & _
                  ";User ID=<uid>;Password=<pwd>;"
    
        Debug.Print
        Debug.Print Timer
        rs.Open "select * from sysobjects, syscomments, sysindexes", conn, adOpenStatic, adLockOptimistic, adAsyncExecute
        Debug.Print "Attempting to Cancel " & Timer
        rs.Cancel
        Debug.Print "Cancel finally executed" & Timer
        Debug.Print "state: ", rs.State
        Debug.Print "observe how long it takes to carry out the Cancel"
    					
  4. 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.

APPLIES TO
  • Microsoft Data Access Components 2.5
  • Microsoft Data Access Components 2.6
  • Microsoft Data Access Components 2.7
Keywords: 
kbbug kbpending KB269577
       

Community Feedback System

Very often, it takes hours to solve a problem. Very often, you've looked high and low, and have tried a lot of solutions. When you finally found it, chances are, it was because someone else helped you. Here's your chance to give back. Use our community feedback tool to let others know what worked for you and what didn't.

Please also understand that the community feedback system is not warranted to be correct, it's simply a system that we've built to let people try and help each other. If something in a feedback response doesn't make sense to you, or you're not comfortable making changes that the feedback talks about (like registry edits), please consult a professional.

Thank you for using kbAlertz.com Feedback System.

-- Scott Cate