A simple question on connection

A simple question on connection

am 13.01.2005 04:24:57 von wing0508

Dear All,

I have a question on the db connection when I develop ASP application

Now, I have a some methods of ASP product class, search, insert, update and
delete

I would like to know when will you make the Connection?
Make the connection when init class?

Or make the connection inside the class method?

thanks~

Re: A simple question on connection

am 13.01.2005 09:43:07 von John Blessing

"Utada P.W. SIU" wrote in message
news:uMQdk8R%23EHA.1408@TK2MSFTNGP10.phx.gbl...
> Dear All,
>
> I have a question on the db connection when I develop ASP application
>
> Now, I have a some methods of ASP product class, search, insert, update
> and
> delete
>
> I would like to know when will you make the Connection?
> Make the connection when init class?
>
> Or make the connection inside the class method?
>
> thanks~
>


Connect just before you do anything with the database, close as soon as
possible afterward.

--
John Blessing

http://www.LbeHelpdesk.com - Help Desk software priced to suit all
businesses
http://www.room-booking-software.com - Schedule rooms & equipment bookings
for your meeting/class over the web.
http://www.lbetoolbox.com - Remove Duplicates from MS Outlook

Re: A simple question on connection

am 18.01.2005 08:14:28 von Bullschmidt

<<
Connect just before you do anything with the database, close as soon as
possible afterward.
>>

Yes, or to keep things simple on a low-traffic site you could connect at
the top of the page and close at the bottom and just before any
redirection to another page.

Best regards,
J. Paul Schmidt, Freelance ASP Web Developer
http://www.Bullschmidt.com
ASP Design Tips, ASP Web Database Demo, Free ASP Bar Chart Tool...


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!