devxlogo

Wait to Instantiate COM Objects in ASP Pages

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.

See also  The Benefits of Patient Engagement Solutions for Healthcare Providers
devxblackblue

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist

©2024 Copyright DevX - All Rights Reserved. Registration or use of this site constitutes acceptance of our Terms of Service and Privacy Policy.