In my Access 2000 db, I use a global ADODB connection object to connect to a SQL server backend database. Right now in every function/subroutine that needs the connection to the sql server, I openned the connection at the start of the procedure and close the connection at the end.
I wonder whether it is necessary to close the connection object in every procedure. What are sides effects of not closing only one connection?
There are three options to me.
First is the way I am doing right now. Closing the connection in every procedure.
Second is just the opposite - No closing in the procedure.
Third is the middle ground. I may close the connection in the form_close event.
This is somehow a best-practice question. Any feedback is appreciated.
Thanks in advance.
Seaport
I wonder whether it is necessary to close the connection object in every procedure. What are sides effects of not closing only one connection?
There are three options to me.
First is the way I am doing right now. Closing the connection in every procedure.
Second is just the opposite - No closing in the procedure.
Third is the middle ground. I may close the connection in the form_close event.
This is somehow a best-practice question. Any feedback is appreciated.
Thanks in advance.
Seaport