Re: Normal Practice....

From: Marina (someone_at_nospam.com)
Date: 11/03/04


Date: Wed, 3 Nov 2004 16:14:28 -0500

I agree with Curt. It's good practice to get into the habit of closing
resources after you are done.

Besides, some day your functions may end up in a class library, in which
case it will all become more difficult for you to have page_unload take care
of everything.

"Wilson Smith" <WWilson67@hotmail.com> wrote in message
news:uahXLLewEHA.2568@TK2MSFTNGP11.phx.gbl...
> Microsoft document says use the Page_Unload event to perform final cleanup
> work.
>
> Like, closing files, closing database connections.
>
> Considering the performance of the application is it always a good idea to
> open the database connection at the Page_Load and do all the work and
close
> the connection in the Page_Unload event? Currently for each routine in its
> specific function/sub routine I am opening the database connection and
> closing.
>
> I am just curious what the normal practice in the industry is in this
> scenario.
>
> Thanks for your reply.
>
> Will
>
>



Relevant Pages

  • Re: Normal Practice....
    ... "Wilson Smith" wrote in message ... > Like, closing files, closing database connections. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Normal Practice....
    ... Like, closing files, closing database connections. ... open the database connection at the Page_Load and do all the work and close ...
    (microsoft.public.dotnet.framework.aspnet)
  • IS it required.... ?
    ... Is it required to destroy the command objectby calling the ... exclusivily the following statement when I am closing the associated ... database connection all the time. ... MySqlCommand = Nothing. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Performance Question with Database Connections
    ... to my mind for example if you have 150 - 350 concurrent users accessing a ... webpage at once what type of load would this put on with having 350 ... closing, etc so I thought I would see what other people would have to say. ... > It doesn't really matter much because of the built in database connection ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Destroying modal Dialog from outside the Dialog class
    ... Closing a modal dialog from outside is so difficult as to best be regarded ... as impossible in practice. ... Tim Ward ... Prev by Date: ...
    (microsoft.public.vc.mfc)