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
• Re: Text wrapping on C# webforms buttons
• Re: Replacing patterns a^b with pow(a,b)
• Re: Problem - Object doesn`t support this property or method
• great sight
• Re: JavaScript: Not working in Firefox 3.x
• Re: Difference between two dates including From & To date
• Re: How to highlight text WITHIN a JTable cell?
• Re: Javascript: return not in function?
• Re: How to concatenate a string and a variable using perl?


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