Hi all,
I have written some applications in Vb that work in the following way :
every 30 seconds a timer creates a new ADO connection and a new ADO
Recordset and read from a DB table Mysql if there are certain data to
elaborate. After that both the connection and recordset are closed and set =
nothing.
This application works 24/24 h and the problem is that slowly the virtual
and physical memory are increased and after a week the PC shows a message
of problems with the virtual memory.
This happens on different operative systems (win xp, win 2000 server , win
2003 server ).
This is for me a big problem that forces me to hold under control the PC, in
fact if I close and I reopen the program everything returns Ok.
What can I do? must the application perhaps be written in another language?
many thanks for your suggestion
Sami Väisänen - 24 May 2005 22:58 GMT
Could be a bug in the ADO implementation or then in the database provider.
You know the deal. Make sure everything's up to date.
> Hi all,
> I have written some applications in Vb that work in the following way :
[quoted text clipped - 13 lines]
>
> many thanks for your suggestion
Steve Jorgensen - 24 May 2005 23:17 GMT
>Hi all,
>I have written some applications in Vb that work in the following way :
[quoted text clipped - 12 lines]
>
>many thanks for your suggestion
There's a problem with VB and DAO that I thought wasn't a problem with ADO,
but perhaps it occurs there, too. I always use the same pattern when coding
with ADO as DAO just in case. The problem in DAO is that if yuo don't make
sure to close objects and set references = Nothing in explicit
reverse-dependency order, you can have leaks. For example, one should close a
recordset, then release the recordset reference, then close the database, then
release the database reference.