473,503 Members | 2,152 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How do you interupt a long-running database query?

I have an ASP.NET/C# web application running against a SQL Server
database using ADO.NET. Whenever there is a long-running database
query, the web application hangs until the database query is complete.
Even clicking the browser's stop button and clicking on other links
within the web application fails. The only thing the user can do is
close the browser and open up a new browser window. Is there any other
way for a user to interupt a database query?
I am not using a Dispose method and thought that might be the
problem. However, there is no "unmanaged" code being used that I am
aware of.
Nov 18 '05 #1
2 1993
You might try having the database operation happen in a new Thread.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Gershon" <gg***@bu.edu> wrote in message
news:78*************************@posting.google.co m...
I have an ASP.NET/C# web application running against a SQL Server
database using ADO.NET. Whenever there is a long-running database
query, the web application hangs until the database query is complete.
Even clicking the browser's stop button and clicking on other links
within the web application fails. The only thing the user can do is
close the browser and open up a new browser window. Is there any other
way for a user to interupt a database query?
I am not using a Dispose method and thought that might be the
problem. However, there is no "unmanaged" code being used that I am
aware of.

Nov 18 '05 #2
Max
I believe you can set the timeout smaller and abort using a try/catch...
which you should be doing anyway whenever you make a database call. I'm new
to ASP.NET however. ;)

Also, I'd be concerned about the database hanging like that. Is there a lot
of network traffic? Optimize your SQL Server? I'm afraid to ask, but you ARE
using stored procedures for all your queries I hope. ;)

-Max
"Gershon" <gg***@bu.edu> wrote in message
news:78*************************@posting.google.co m...
I have an ASP.NET/C# web application running against a SQL Server
database using ADO.NET. Whenever there is a long-running database
query, the web application hangs until the database query is complete.
Even clicking the browser's stop button and clicking on other links
within the web application fails. The only thing the user can do is
close the browser and open up a new browser window. Is there any other
way for a user to interupt a database query?
I am not using a Dispose method and thought that might be the
problem. However, there is no "unmanaged" code being used that I am
aware of.

Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1256
by: Dave | last post by:
How would I program an interupt. If I have two buttons on a form, one starts a loop and the other stops the loop. What code would I need to add? private void button1_Click(object sender,...
7
1472
by: Frank | last post by:
I need to make a program that will import data from a text file into a database. I have already designed the user interface, and I am coding a class to open the file and handle the data. Now an...
9
3920
by: luke | last post by:
Hi everybody, please, can someone explain me this behaviour. I have the following piece of code: long long ll; unsigned int i = 2; ll = -1 * i; printf("%lld\n", ll);
0
1100
by: ld | last post by:
Hi, I have a lib that implements the custom actions for my setup. I would like to be able to interupt the setup if an error occured or if the user wants to cancel one of the forms that execute...
21
2780
by: Charles Sullivan | last post by:
I maintain/enhance some inherited FOSS software in C which has compiler options for quite a few different Unix-like operating systems, many of which I've never even heard of. It would be...
12
13364
by: Ahmad Jalil Qarshi | last post by:
Hi, I have an integer value which is very long like 9987967441778573855. Now I want to convert it into equivalent Hex value. The result must be 8A9C63784361021F I have used...
1
1492
by: sigamani | last post by:
how many interupt in embedded in c language
2
7253
by: PengYu.UT | last post by:
Hi, In python, triple quote (""") can be used to quote a paragraph (multiple lines). I'm wondering if there is any equivalent in C++. For the following code, I could write the long string in a...
10
3796
by: ratcharit | last post by:
Currently using cosine function in math.h Currently I get: 1 = cos(1e^-7) Is there another way for cos to return value of high accuracy say: 0.999999 = cos(1e^-7)
15
2717
by: Oliver Graeser | last post by:
I need a >49 bit integer type. tried sizeof(long long), says 8. 8 byte = 64 bit right? but when I try to assign a value with more than 32 bit, it fails. To illustrate: for (i=0; i<64; i++){...
0
7093
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7287
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7467
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5594
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5022
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3177
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3168
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
746
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
399
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.