循环问题/记忆问题 [英] loop problems/memory problem
问题描述
我有一个大问题,我需要创建一个程序,它将循环24x7以检查数据库,它不会消耗大量内存。我的平台是vb6或.net任何建议请..
I have a BIG Problem, I need to create a program that will loop 24x7 to check the database and it wouldn?t consume a lot of memory. My platform is vb6 or .net Any advise Please..
推荐答案
你可以有一个计时器,每小时左右检查一次数据库的新记录,而不是让它运行不断。 (1小时是3,600,000毫秒,如果你需要知道。:P)
You could have a timer that checks the database every hour or so for new records instead of having it run constantly. (1 hour is 3,600,000 milliseconds if you need to know. :P )
我有一个大问题,我需要创建一个程序这将循环24x7以检查数据库,它不会消耗大量内存。我的平台是vb6或.net任何建议请..
I have a BIG Problem, I need to create a program that will loop 24x7 to check the database and it wouldn?t consume a lot of memory. My platform is vb6 or .net Any advise Please..
究竟是什么问题?这听起来很简单。我可能会建议使用Timer控件,如前面的消息所示。
为什么要使用大量内存?如果您的表包含大量记录,并且您保持记录集打开,则可能就是这种情况。但是您只需要打开与数据库的连接,然后通过它运行SQL查询。这需要更少的RAM。
What''s the problem, exactly? This sounds pretty simple to create. I''d probably recommend going with a Timer control, as the prior message suggested.
Why should it use a lot of memory? If your table contains a huge number of records, and you keep a recordset open, this may be the case. But you only need to open a connection to the database, and then run SQL queries through that. This takes much less RAM.
但我需要每秒检查一次我的数据库。
but I need to check my database every single second.
这篇关于循环问题/记忆问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!