Click here to Skip to main content
13,147,689 members (30,582 online)
Rate this:
Please Sign up or sign in to vote.
See more:
Hello all,

How to stop a long running query on button click from front end and how to stop filling data to datatable when stop button clicked.

so my requirement is like if i clicked on stop button whatever data fetched into datatable that should populate in gridview.

i am using oracle as my database.

please suggest me a way how to do it with example.

thanks in advance,
Posted 12-Feb-13 2:01am
Updated 12-Feb-13 3:19am
Rate this: bad
Please Sign up or sign in to vote.

Solution 1


1) Read your records one by one using the SQLDatareader and add it into the data table
2) If the user clicks stop button, break the loop and show the data which is in the data table.

Best Regards
karteekboddu 12-Feb-13 8:18am
Thankyou for your solution,

Could you please provide some example code
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

I don't think its possible.

You could kill the thread from outside if you want but that is terribly risky and can cause problems.


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web04 | 2.8.170915.1 | Last Updated 12 Feb 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100