计时器控制期间出现异常 [英] Exception Arises During Timer Control

查看:108
本文介绍了计时器控制期间出现异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好朋友

这次我正在做一个项目,在该项目中,我需要从数据库中获取与任何用户的时间,并检查数据库中的系统日期是否相同,并且系统时间是否也与一个通知相匹配,从而通知我需要在此致电此人时间.

朋友,我已经制作了所有d程序,唯一的问题是一段时间后,我说与数据库的连接断开了50秒,这使我无法确定连接状态的错误.

我有所有消息来源试图捕获此异常,但这种情况并未发生.
有人可以帮我解决这个问题吗?????????????并调试此异常,您需要收集更多信息.您可以广泛使用日志记录.我建议使用类 System.Diagnostics.EventLog记录大量详细信息,其中使用系统事件日志记录数据,使用事件查看器进行查找.

另请参阅我过去的解决方案:
将MsBuild OutPut即时发送到TextBox Windows应用程序中 [ ^ ],
如何在文件夹下创建事件日志 [ ^ ].

—SA


Hi friends

This time i am making a project in which i require to get time against any user from database and check if system date is same in database and if system time also matches the one notification get raised informing me that i need to call this person at this time.

Friends i have made all d program, only problem is this that after some time say 50 sec my connection from database gets disconnected and it throws me an Unspecified error of connection state closed..

i have all my sources in try to catch this exception but it is not happening.
Can any one help me out in this problem????????

解决方案

Hard to say what exactly could be wrong, but if you have problem to reproduce and debug this exception, you need to collect more information. You can use logging extensively. I would suggest using the class System.Diagnostics.EventLog to log a lot of detail using the system event log for the sink of data and Event Viewer for looking up.

See also my past solutions:
MsBuild OutPut to the TextBox on the fly in Windows Application[^],
How to create event log under a folder[^].

—SA


这篇关于计时器控制期间出现异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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