473,804 Members | 3,675 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

q; ExecuteNonQuery asynchronously

Hello,
Is there any way I can run ExecuteNonQuery asynchronously, such as initiate
stored procedure call and return immediately.
Thanks,
Jul 10 '06 #1
2 2185
JIM.H. wrote:
Hello,
Is there any way I can run ExecuteNonQuery asynchronously, such as
initiate stored procedure call and return immediately.
Two ways:

1. Create a delegate to ExecuteNonQuery and use the BeginInvoke method on
that delegate.

2. Use System.Threadin g.ThreadPool.Qu eueUserWorkItem .

Either of these methods will ultimately cause a thread pool thread to call
ExecuteNonQuery for you.

-cd
Jul 10 '06 #2
JIM.H. <JI**@discussio ns.microsoft.co mwrote:
Is there any way I can run ExecuteNonQuery asynchronously, such as initiate
stored procedure call and return immediately.
Does BeginExecuteNon Query not do what you want?

-- Barry

--
http://barrkel.blogspot.com/
Jul 10 '06 #3

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

Similar topics

4
5790
by: Bob Murdoch | last post by:
I have an ASP application that calls a COM function to create a custom report as an Excel file. This works in a synchronous fashion, as long as the report does not take too long to create. If that happens, the session times out and we run into other kinds of problems. I have, in other cases, executed a stored procedure asynchronously (thanks to a tip from this group) thru ADO. I'm wondering if ASP provides some way of executing a...
1
2383
by: Sin Jeong-hun | last post by:
Many applications need to lanch a web browser to show its homepage to users. I used System.Diagnosis.Process.Start("http://www.google.com"); Or I launched other application like System.Diagnosis.Process.Start("notepad.exe"); But the problems is the application freezes for a couple of seconds till the application starts. Is there any way to start a process asynchronously, so that my application wouldn't freeze? Should I create a new...
2
1529
by: jdb | last post by:
Hi, I am adding a record to the database using an ExecuteNonQuery, which adds without problem. Now after the record is added I run a method passing in some info as well as the curretnly opened connection (byRef cn as OleDbConnection). Am using an Access 2000 database. Now in this new method I create a command object using the passed in connection object. I then create a DataReader to read the database that has the record added in the...
5
9580
by: Dave A | last post by:
I have an application that does lots of socket communications all asynchronously via the TcpClient class. The code has been working 99.9999% of the time (yeah one of those bugs) but occasionally the receiving thread would get 'stuck'. The pattern that I have used from the reading is quite common... AutoResetEvent waitForReadToComplete; NetworkStream stream; .... code to start the socket, send some data and then read the data by...
0
1478
by: archana | last post by:
Hi all, I am having problem in one web method which i am running asynchronously I set oneway attribute in web method. What i want is once client called this web method this should start asynchronously. My client is windows application means after calling web method
3
1601
by: Sidanalism | last post by:
I miss the old way when asynchronous calls are driven my window messages. Yes a thread pool might greatly improve application performance but there are time I don't want my event to be fire in a thread differ from the calling thread. When a delegate is called in another thread it could be frustrating for I have to consider thread occurrence issues in all the codes it may invoke along my event chain. Sure the "Control.BeginInvoke()" could...
14
2557
by: Mike C# | last post by:
Hi all, Is it possible to make 10 POST requests from ASP.NET asynchronously? I have been working on this problem for a few days now, and I seem to keep running up against IIS limitations. Basically here's the process as it works now (synchronously): Person visits mywebsite.com and fills out a form mywebsite.com POSTs one request to providerwebsite.com mywebsite.com receives response
4
7237
by: GR | last post by:
Hi, I've got a soap message as a string and would like to post it to a webservice (in C#) asynchronously: For example something like: string soap = "<soap:Envelope >...<MyMessageBody>....</soap:Envelope>"; I use the HttpWebRequest object to send off the message. But I think it does so synchronously. I'd like to do it asynchronously.
9
3656
by: Denis | last post by:
Hello, Maybe somebody already solved this task. I need to load JS asynchronously without blocking browser. This means that I do not need to block browser to load/render during loading script. The simple construction to do this: jsJSNode = document.createElement(“script”); jsJSNode.type = “text/javascript”; jsJSNode.src = “http:// den-01/Default.aspx“; document.body.appendChild(jsMyNode);
0
10586
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10338
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10323
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10082
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7622
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6856
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5525
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5658
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4301
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 we have to send another system

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.