Click here to Skip to main content
15,891,943 members
Please Sign up or sign in to vote.
1.00/5 (1 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
Updated 12-Feb-13 3:19am
v2

Hi,

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
Muthuraja
 
Share this answer
 
Comments
karteekboddu 12-Feb-13 8:18am    
Thankyou for your solution,

Could you please provide some example code
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.

Cheers,
Edo
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900