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
• GET METHOD
• Re: windows service - web service - com
• Re: Storing data from HTML to Excel or TXT
• Re: Help totalReads=1 totalReads++=2 write totalReads 3 not 2
• Re: Using Javascript to create simple tabs
• Re: how to create forum using asp.net with c# language?
• Re: Problems in login using WWW::Mechanize
• reading excel sheet contents in html
• Re: where can i download javax.speech package


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2010