Browse DevX
Sign up for e-mail newsletters from DevX

Tip of the Day
Language: Enterprise
Expertise: Intermediate
Dec 20, 2000



Building the Right Environment to Support AI, Machine Learning and Deep Learning

Wait to Instantiate COM Objects in ASP Pages

When you are unsure if you need to instantiate an object from your ASP pages, as in the case of instantiating a COM object to access SQL Server, it is better not to use the Server.CreateObject method. This method creates an object immediately. Why go to all the trouble of instantiating an object that may not be needed, wasting server resources and hindering performance? Instead, declare the object using the tag. This way, the object is only instantiated when one of its methods or properties is used for the first time, assuming it is ever used at all.
Andrew Holliday
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date