Generally speaking, it is better to close your database connection and recordsets as quickly as possible because they use server resources. Not much, but when lots of users are connected it could make a big difference.
In your case, I would keep the connection open, use a separate object for each recordset. Don't create the recordset object until you are ready for it, then close it as soon as you are done with it. Create the next recordset object, use it, close it. And so on.
Hope it helps.
-George
Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
Also you can just reuse the same recordset if the data that you need from each is used on discreet areas of your output page. Simply close it after you output the first dataset and then re-open it with the second source.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.