memory issue using ADO to query Excel
Hi dennis,
I clear my recordset variable after each query. I
make sure that you set _all_ objects to nothing when you finished your code!
Esp. the connection string.
If you have many queries with one connection string then make sure that you
open the connection only once, run your queries and close the connection.
This is a lot faster the open-query-close-open-query-close...
After a while and lots of queries your Excel will be slow and using a lot of
memory anyway. However, you can work much longer without troubles when you
do what I mentioned.
regards
arno
|