开发者

Use Async CTP VB with SqlDataAdapter for a Select statement and a DataSet

开发者 https://www.devze.com 2023-04-12 14:44 出处:网络
I want to know how to use the ASYNC CTP to manage the querying of a SQL Database with a SQL Select statement and use a SQLDataAdapter to fill in a DataSet.I have downloaded the VS2010 SP1 and the ASYN

I want to know how to use the ASYNC CTP to manage the querying of a SQL Database with a SQL Select statement and use a SQLDataAdapter to fill in a DataSet. I have downloaded the VS2010 SP1 and the ASYNC CTP, I have also rev开发者_如何学运维iewed the videos on the MSDN site and the documentation included.


Okay, I understand your question now.

You can't have SqlDataAdapter fill dataset asynchronously. SqlDataAdapter doesn't provide support for asynchronous event programming such as those in Windows Forms' PictureBox and SoundPlayer.

If you want to do async on SqlDataAdapter, you have to extend SqlDataAdapter to implement Completion and Cancellation event handling, by yourself. You have to define completed event and async event args, by deriving from the AsyncCompletedEventArgs class.

For more information, visit: "Walkthrough: Implementing a Component That Supports the Event-based Asynchronous Pattern" on MSDN Library.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号