S
Steve Richter
I really miss c++ ....
I have an SqlConnection object within my Web.UI.Page object. The
thinking is that the connection to the database server is opened once
when the page starts to do its thing, then when everything is rendered
down to the browser, and all references to the page object are ended,
the connection to the server can be closed.
First of all, are the SqlConnection Open and Close methods quick
performers and I dont need to concern myself with caching the
SqlConnection. I am not doing a lot of IO.
Is there an event I can hook that is fired at the end of a pages life
that can be used to close the SqlConnection?
But basically, I dont follow the functioning of IDisposable and the
Dispose method. In the context of a web page object, who calls Dispose
and when is it called?
thanks,
-Steve
I have an SqlConnection object within my Web.UI.Page object. The
thinking is that the connection to the database server is opened once
when the page starts to do its thing, then when everything is rendered
down to the browser, and all references to the page object are ended,
the connection to the server can be closed.
First of all, are the SqlConnection Open and Close methods quick
performers and I dont need to concern myself with caching the
SqlConnection. I am not doing a lot of IO.
Is there an event I can hook that is fired at the end of a pages life
that can be used to close the SqlConnection?
But basically, I dont follow the functioning of IDisposable and the
Dispose method. In the context of a web page object, who calls Dispose
and when is it called?
thanks,
-Steve