473,472 Members | 1,717 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Cancel the execution of a query in ado.net

2 New Member
Hi,

I am developing one windows based application using c#.
I have one datagird and one search button. By clicking on the search button it wil connect to the database and get data and bind it to the datagrid.
My requirement is after clicking on the search button one dialogbox like thing should be shown which wil contain a lable and a cancel button. If we click on the cancel button it should stop executing the query and it should not fetch the data. so, the datagrid will be empty.

Is there any way to do this functionality. It is very urgent for me.
If somebody knows please help me.

Thanks and regards
Pallavi.B
Jan 10 '08 #1
2 1794
camel
55 New Member
Utilise an ADO.Net Transaction object would be my first thought and call Abort in response to the cancel command. Alternatively just set a variable when Cancel is hit and check that before deciding to populate the grid\clear the grid if is set depending on the timing of the data retrieval and binding taking place.
Jan 12 '08 #2
Pallavi Shroff
2 New Member
Hi,

thanks for your reply. I will try that.

Regards
Pallavi
Jan 18 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

29
by: Mainlander | last post by:
An ISP I belong to uses Majordomo for their mailing list system. I'd like to encourage them to move to a system that uses a database, preferably psql which they already run on their server....
6
by: downwitch | last post by:
OK, the last time didn't get an answer, let's see if I can explain it better. (Someone else here _must_ have done this at some point?) I have a progress-meter type thing set up to follow the...
1
by: Jeffrey Kingsley | last post by:
I would like to cancel a call to BeginInvoke of a delegate (i.e. kill the thread the call was made on). This would be done when a timeout occures for the waitone call to the WaitHandle object of...
1
by: Jay | last post by:
I am new to coding so I am trying to learn. I have a save dialog box that I am able to get to work. I can save a file and all is good. My problem is when I hit cancel I am getting an error and I...
2
by: The Whistler | last post by:
I have an app that users can search through a support knowledge base. If a user enters criteria that would cause the app to freeze while it is trying to gather the data, I would like to program a...
1
by: Kuldeep Tanna | last post by:
Hi, I issued a query from ASP using ADO. The web page after some time showed something similar to a 404 NOT found page. Postgres is still executing the query. How do I cancel the execution of that...
2
by: =?Utf-8?B?Vk1J?= | last post by:
How can I stop an event handler from executing? For example, I my Gridview RowEditing event handler looks like this: protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e) {...
16
by: parez | last post by:
I start a BackGroundWorker to populate a grid. It is started off in the ui layer The thread follows( cannot think of a better word) the path UI->Layer1->Layer2->Communication Layer and it...
4
by: sphinney | last post by:
Hi everyone. I'm creating an application inside Access 2007. The application will retrieve data from various locations on my company's network servers. Depending on the time of day, alignment of...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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
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
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
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.