ADODB Connection

Please support our ASP.NET advertiser: $4.95 a Month - ASP.NET Web Hosting – Click Here!
Reply

Join Date: Apr 2007
Posts: 437
Reputation: Fungus1487 is on a distinguished road 
Solved Threads: 50
Fungus1487's Avatar
Fungus1487 Fungus1487 is offline Offline
Posting Pro in Training

ADODB Connection

 
0
  #1
Apr 9th, 2008
Hello All.

This seems like a simple question but i cannot find a solid answer anywhere.

Im in the middle of streamlining our web application for use on local network and external use.

When a form loads there are usually several blocks of code that run.

EG.
Fetch Title From Database
Fetch Items For Combo Lists To Populate
Fetch Saved Data To Insert Into Fields

NOW obviously there is some processing inbetween especially step 2 of filling combo lists which can contain anywhere between 1 - 1000 selections (not practical but it is the users choice if they want 1000)

I understand opening a connection to a database is a costly server action processing wise and also is time consuming. So is it better for me to maintain one connection to pass to these seperate methods on page load or open a new instance-return data-close connection inside each method.

cheers.
When Autumn Falls [ http://www.whenautumnfalls.co.uk ] &&
Designdotworks [ http://www.designdotworks.co.uk ] Web / Graphic / Software Design
Reply With Quote Quick reply to this message  
Join Date: Dec 2007
Posts: 291
Reputation: ericstenson is an unknown quantity at this point 
Solved Threads: 29
Team Colleague
ericstenson's Avatar
ericstenson ericstenson is offline Offline
Posting Whiz in Training

Re: ADODB Connection

 
0
  #2
Apr 9th, 2008
How many users? Most people would say retrieve all at once, BUT I bet it doesn't matter. Write a loop and see how quickly your SQL server can write 500,000 records. You will be shocked. A few commands isn't "taxing" like people claim.
--
"Dummy."
Reply With Quote Quick reply to this message  
Join Date: Apr 2007
Posts: 437
Reputation: Fungus1487 is on a distinguished road 
Solved Threads: 50
Fungus1487's Avatar
Fungus1487 Fungus1487 is offline Offline
Posting Pro in Training

Re: ADODB Connection

 
0
  #3
Apr 9th, 2008
OK ill give it a whirl and see what is happening. User wise it could be from 10 - 100 users at any one time.
When Autumn Falls [ http://www.whenautumnfalls.co.uk ] &&
Designdotworks [ http://www.designdotworks.co.uk ] Web / Graphic / Software Design
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the ASP.NET Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC