IMHO whether to leave a connection open between multiple database calls in one page depends on how much processing you're doing between each call. If you are only doing a few assignment statements then I don't see any point in closing a connection doing a few statements and then having to go and get another connection. You have to way up which is going to use more cpu cycles: a few statements or a disconnection and reconnection?
Peace Lau ----- Original Message ----- From: "Chris Tifer" <[EMAIL PROTECTED]> To: "ActiveServerPages" <[EMAIL PROTECTED]> Sent: Tuesday, October 01, 2002 2:02 AM Subject: Re: Which way is better? (ADO Connection) > That's the way I handle it too. > > I open my connection, throw all of my data into arrays then close and > kill all connections and manipulate the data in any way I need to. > > I'm going to do some searching for connection pooling today though to > learn more. > > Chris Tifer > http://www.emailajoke.com > > > ----- Original Message ----- > From: "Bill Bolte" <[EMAIL PROTECTED]> > To: "ActiveServerPages" <[EMAIL PROTECTED]> > Sent: Saturday, September 28, 2002 9:38 AM > Subject: Re: Which way is better? (ADO Connection) > > > > the articles on connection pooling will answer that question. i generally > > open, do my accesses, then close. i've been using getRows with this and it > > is very speedy. > > > > ----- Original Message ----- > > From: "Roji Thomas" <[EMAIL PROTECTED]> > > To: "ActiveServerPages" <[EMAIL PROTECTED]> > > Sent: Saturday, September 28, 2002 11:26 AM > > Subject: Re: Which way is better? (ADO Connection) > > > > > > > No actually what i asked is > > > Is it is better to open and close a conmnection for > > > each database access or > > > opening a connection at the beginning of a page, > > > perform all operations and close it at the end of the page? > > > > > > > > > > > > ----- Original Message ----- > > > From: "M. H. K." <[EMAIL PROTECTED]> > > > To: "ActiveServerPages" <[EMAIL PROTECTED]> > > > Sent: Saturday, September 28, 2002 7:25 PM > > > Subject: Re: Which way is better? (ADO Connection) > > > > > > > > > > Which one is better ? > > > > > > > > Using one check out register in the grocery store and have 100 clients > > get > > > > lined up for their turn ? > > > > > > > > or > > > > > > > > Opening up a register where there is client gets in the lane !.. > > > > > > > > First is known to be "serialization" and it is evil. It is bound fail. > > > > > > > > Second is know to be "connection pooling". > > > > > > > > Cut it short and always open and close your connections at page level. > > > > > > > > And don't even think getting into storing your connections or > recordsets > > > > into Application level objects. > > > > > > > > As Rob says, connection pooling is the thing to read on. And > > > > "serialization" is the other. > > > > > > > > > > > > > > --- > > > You are currently subscribed to activeserverpages as: [EMAIL PROTECTED] > > > To unsubscribe send a blank email to > > %%email.unsub%% > > > > > > > > > --- > > You are currently subscribed to activeserverpages as: [EMAIL PROTECTED] > > To unsubscribe send a blank email to > %%email.unsub%% > > > --- > You are currently subscribed to activeserverpages as: [EMAIL PROTECTED] > To unsubscribe send a blank email to %%email.unsub%% > --- You are currently subscribed to activeserverpages as: [email protected] To unsubscribe send a blank email to [EMAIL PROTECTED]
