异步读取数据库中数据
2009-04-21 20:32
204 查看
在普通sql语句后面加上;async=true.
There are four common ways to use BeginXXX and EndXXX to make asynchronous calls. In all cases, you
invoke BeginXXX to initiate the call. After that, you can do one of the following:
Do some work and then call EndXXX. If the asynchronous operation is not finished, EndXXX will
block until it completes.
❑ Using a WaitHandle obtained from the IAsyncResult.AsyncWaitHandle property, call the
WaitOne() method to block until the operation completes; then call EndXXX.
❑ Poll the IAsynResult.IsCompleted property to determine when the asynchronous operation
has completed; then call EndXXX.
❑ Pass a delegate for a callback function that you supply (of type IAsyncCallback) to BeginXXX.
That callback function will execute when the asynchronous operation completes. Code in the
callback function calls EndXXX to retrieve the result.
There are four common ways to use BeginXXX and EndXXX to make asynchronous calls. In all cases, you
invoke BeginXXX to initiate the call. After that, you can do one of the following:
Do some work and then call EndXXX. If the asynchronous operation is not finished, EndXXX will
block until it completes.
❑ Using a WaitHandle obtained from the IAsyncResult.AsyncWaitHandle property, call the
WaitOne() method to block until the operation completes; then call EndXXX.
❑ Poll the IAsynResult.IsCompleted property to determine when the asynchronous operation
has completed; then call EndXXX.
❑ Pass a delegate for a callback function that you supply (of type IAsyncCallback) to BeginXXX.
That callback function will execute when the asynchronous operation completes. Code in the
callback function calls EndXXX to retrieve the result.
相关文章推荐
- C# 异步读取数据库里面的数据与绑定UI的解决办法
- C# 异步读取数据库里面的数据与绑定UI的解决办法
- C# 异步读取数据库里面的数据与绑定UI的解决办法
- Echarts地图省市关联下钻,读取数据库中数据
- PHP-Excel读取导入Excel数据到数据库(2003,2007通用)使用方法
- SerialPort同步和异步数据读取(二)
- 游戏服务器中的数据库异步操作技术和游戏数据的保存机制
- 从数据库中读取一组图片数据并使其做向左的无缝滚动
- 异步操作读取网络的json数据(有道翻译实例)
- (四)、读取数据库数据并在HighCharts上显示
- 基于JDBC从数据库中读取数据,在百度地图批量标注地点
- C#从数据库中读取数据加入到combox的items中,并显示出当前model值在combox中
- 创建一个sms.db数据库俩面在创建一个message表,插入数据然后在读取数据
- python读取文本数据写入到数据库及查询优化
- 笔记:读取sql文件,然后将数据批量插入数据库
- Nifi读取Hive中数据然后再写入新Hive数据库表操作
- 用Derby数据库读取加密的DAT数据文件(二)
- SQL C# nvarchar类型转换为int类型 多表查询的问题,查询结果到新表,TXT数据读取到控件和数据库,生成在控件中的数据如何存到TXT文件中
- 从数据库中读取数据显示到树
- j2se使用数据模型和JTable完成数据库读取和查询操作