PDA

Click to See Complete Forum and Search --> : Keeping recordsets open?


MagellanTX
Aug 14th, 2002, 09:38 AM
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!!!

Cander
Aug 14th, 2002, 09:51 AM
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.

MagellanTX
Aug 14th, 2002, 10:00 AM
Thanks for the advice. I will take a different approach since this will have multiple users attached.