Use async delegates. Declare a delegate that matches SqlCommand.ExecuteNonQuery, create an instance of the delegate, and call BeginInvoke on it. Provide a completion delegate. In your completion delegate, call the delegate's EndInvoke method. Badda-bing.
-- arlie -----Original Message----- From: Moderated discussion of advanced .NET topics. [mailto:[EMAIL PROTECTED] On Behalf Of Brian Gaer Sent: Tuesday, October 07, 2003 7:09 PM To: [EMAIL PROTECTED] Subject: [ADVANCED-DOTNET] Async Data Commands with ADO.Net Is anyone familiar with a method to have an ADO.Net command object perform a command.ExecuteNonQuery() asynchronously? The Stored Proc I am calling takes from 2 to 10 minutes to return, and I cannot wait for it and do not care what the results of the query are. I searched all over and the only option I have found is creating a new thread to make the database call. Is there any other way that anyone is aware of? Language: C#, Database MSSQL Sever 2000 Using ADO.Net Thank you, Brian Gaer [EMAIL PROTECTED] =================================== This list is hosted by DevelopMentorR http://www.develop.com NEW! ASP.NET courses you may be interested in: 2 Days of ASP.NET, 29 Sept 2003, in Redmond http://www.develop.com/courses/2daspdotnet Guerrilla ASP.NET, 13 Oct 2003, in Boston http://www.develop.com/courses/gaspdotnet View archives and manage your subscription(s) at http://discuss.develop.com =================================== This list is hosted by DevelopMentorŪ http://www.develop.com NEW! ASP.NET courses you may be interested in: 2 Days of ASP.NET, 29 Sept 2003, in Redmond http://www.develop.com/courses/2daspdotnet Guerrilla ASP.NET, 13 Oct 2003, in Boston http://www.develop.com/courses/gaspdotnet View archives and manage your subscription(s) at http://discuss.develop.com