codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  Server.CreateObject()  etorito35 at 16:22 on Friday, February 06, 2004
 

I have an update page that takes input from several forms and loads it to the different tables in my database. I include a dabatase connection at the top of the page and open up the server object once to update all the different tables. Is it good to create an object once on the page and reusing it or should I close it and create a new object every time?

Your feedback is appreciated

David

  Re: Server.CreateObject()  Troy Wolf at 01:06 on Monday, February 23, 2004
 

Not exactly sure I understand what you are asking, but anytime I use an object, I create it once, use it however many times I need, then destroy it. Instantiating the object can be expensive--don't destroy and re-instantiate during the same script. Just create it once, use it throughout the script.
Troy Wolf: site expert
SnippetEdit Website Editor


  Re: Server.CreateObject()  etorito35 at 15:48 on Monday, February 23, 2004
 

That's exactly what I was looking for. Thanks for your reply.









CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
•  Help me to write a C++ program
•  begginer error
•  Re: Converting VC++6 to VC++8, Wrong Library Files
•  Re: Grep or fgrep ??
•  php on two apache vurtualhost sites
•  Dynamically use a text file
•  Text formatting in Perl
•  Re: dynamic crystal report generation
•  Grep or fgrep ??


Recent Articles
What is a pointer in C?
Multiple submit buttons with form validation
Understanding Hibernate ORM for Java/J2EE
HTTP screen-scraping and caching
a javascript calculator
A simple way to JTable
Java Native Interface (JNI)
Parsing Dynamic Layouts
MagicGrid
Caching With ASP.Net


© Copyright codetoad.com 2001-2006