As a general rule:
At the top of your page, open your connection to the database.
Leave it open throughout the page.
At the bottom of the page, close the connection. (And, with ASP code, if you forget to do the close it doesn't matter. ASP will close it for you. There's a miniscule performance penalty--a microsecond or two--if you let ASP do it for you.)
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.