使用线程计时器每10秒更新一次内存中的数据表 [英] Updating Datatable in memory every 10 seconds with Threading Timer

查看:66
本文介绍了使用线程计时器每10秒更新一次内存中的数据表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要每10秒升级一次数据集的数据表,以保持数据同步,我试图用System.Threading.Timer中的fillad方法用dataadpter填充数据集,但是在第二次滴答之后计时器给我一个例外,为什么?

如何每隔10秒从数据集中更新内存中的数据表?
最好的方法是什么?

谢谢.

I need to upgrade a Datatable of a dataset every 10 seconds for keep data in synch, i''ve tried to fill the dataset with a dataadpter from a System.Threading.Timer with fill method, but after the second Tick of the timer give me an exception, Why ?

How can i do for a update a datatable in memory from a dataset every 10 seconds ?
What is the best way ?

Thanks.

推荐答案

Alessio Pollero写道:
Alessio Pollero wrote:

...在第二个滴答声之后计时器给我一个例外,为什么呢?

... after the second Tick of the timer give me an exception, Why ?



您得到了什么类型的例外?



What type of exception did you get?


这篇关于使用线程计时器每10秒更新一次内存中的数据表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆