ASP ADODB Connections
When writing functions that are/will be used in a number of different files/pages, is it better to allow each function to create its own ADODB.Connection and ADODB.Recordset objects, or to have them use such public objects which are created at the beginning of the page and destroyed at its end?
The pros and cons I see right now are that If each function creates its own objects, it creates much overhead. On the other hand, with each new created page I don't have to worry about creating and managing new ADODB objects, it's all already done in the functions. Also, there's a lesser chance of conflict between the functions using the same objects at the same time and messing something up for one another.
How do you do it? What do you think about it?
The pros and cons I see right now are that If each function creates its own objects, it creates much overhead. On the other hand, with each new created page I don't have to worry about creating and managing new ADODB objects, it's all already done in the functions. Also, there's a lesser chance of conflict between the functions using the same objects at the same time and messing something up for one another.
How do you do it? What do you think about it?
