Results 1 to 3 of 3

Thread: Keeping recordsets open?

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2001
    Location
    Houston, TX
    Posts
    342

    Keeping recordsets open?

    On an ASP.NET page is it possible to keep recordsets open?

    My problem is that everytime I need to update something on the page (postback) I have to re-open my connection to SQL and query the database again. This would be much faster if there was a way to keep the recordset open.

    If possible, where should I start looking?

    Thanks!!!

  2. #2
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    Every web programmer will tell you the same thing. You do not and should not presist database connections/recordsets in a web application. Dont even look any further for this. It provides 0 benefit, but wil lhog resources and SEVERLY slow down your web site when multiple users are accessing the site with database connections open. And as web apps are stateless, there is no reliable way to close the connection when you need to when you do that which will leave database connections open, eventually crapping out your site.
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2001
    Location
    Houston, TX
    Posts
    342
    Thanks for the advice. I will take a different approach since this will have multiple users attached.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width