you should create an include file for your connection strings. use UDLs if at all possible for the actual connection parameters, then define constants in the include file that point to the UDL. This enhances security and allows you to change the connection string should u ever need to, in one place -- the UDL.
open the database connection just b4 you need it and close it immediately after. at worst, open it at the start of the page, and close it at the end. never open it just because. database conections are the most precious resource in your system. don't waste them (and add overhead) by unnecessarily creating them, or by leaving then open longer than needed.
The only reason I can think of that someone might say not to create the connection in each page (or in an include file) is because of the time to repeatedly connect and disconnect each time a page is requested
quite the opposite, close 'em right away.
of course, the best way is to create the actual connection in a DLL and instantiate a COM object, but for a pure asp answer...