CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Cancel Query

  1. #1
    Join Date
    Mar 2001
    Location
    Rhode Island
    Posts
    56

    Cancel Query

    If I run a query in SQL Plus and it is taking too long to display the results, I have the ability to cancel the query in the middle of its process.

    When running this same query in Visual Basic, is there a way to invoke this command when the query is in the middle of running. I want to allow the users to be able to cancel out of the process if it is taking to long.

    Any suggestions??

    Thank you!


  2. #2
    Join Date
    May 2000
    Location
    New York, NY, USA
    Posts
    2,878

    Re: Cancel Query

    set rs = conn.execute(strquery, , adasyncExecute)

    Do until rs.state <> adstateExecuting
    r = msgbox "Do you want to cancel?",vbyesno
    If r = vbyes then rs.cancel
    Loop


    Iouri Boutchkine
    [email protected]
    Iouri Boutchkine
    [email protected]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured