|
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
|
|
|
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.
|
|
|
|
|
That's exactly what I was looking for. Thanks for your reply.
|
|
|
|
|
|
|
|