Too many connections on ASP page

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • usr123
    New Member
    • Feb 2010
    • 20

    Too many connections on ASP page

    I am working with an ASP application. It is using one file where its creating the connection string an dopening the connection. On every page, its passing connection string while opening recordset but not closing anything aprt from the recordset. Does it effect the performence? Does it mean that every time it opens recordset, connection string needs to be provided and its not teh same as opening a connection to the database?
    Can somebody plz carify?
  • CroCrew
    Recognized Expert Contributor
    • Jan 2008
    • 564

    #2
    Hello usr123,

    It sounds like there is a function on your page that handles calls to the database. So, in this case “yes” every time you call your function to return a recordset you are opening a connection to the database and by the sounds of it you’re not closing that connection so you are relying on the garbage collection to close your open connections.

    This is not an efficient way of using your database. To fix this I would see if you can cut down on the calls to the database (maybe using JOINs or limiting the need to make the calls) and most important close your connections to the database.

    Feel free to post your code and maybe we can provide some recommendations to you on what you can do to streamline your site more.

    Happy Coding,
    CroCrew~

    Comment

    Working...