Includes Boost Productivity, Code Performance - 09 Mar 2000

You can improve both your productivity and your Web applications’ performance by judiciously using server includes. And if you use Visual Basic (VB) instead of Active Server Pages (ASP) for database development, you can use includes in your code modules to reap the same benefits.

How’s that, you say? For example, you can collect SQL Server Magazine’s tips and techniques for creating high-performance code and build those code routines into your include files. You and other developers can then use those routines to help build your applications.

The RunSQL function executes an SQL statement but doesn’t generate a record set. This function is particularly handy for Insert, Update, and Delete statements that don’t return a record set. You could just rely on your developers to remember how to execute SQL statements and not return a record set. Or you could put this function in an include file so your developers could simply call RunSQL and pass in the SQL statement. In addition, most programmers will likely use RunSQL over and over instead of writing the ADO code themselves, so they’ll have more time to perform other tasks.

You can even automate the use of includes in your development tools. If you’re using Visual InterDev, for instance, you can place the include statement on the Toolbox:

<!--#INCLUDE FILE="Database.asp"-->

Then, whenever you need the include statement, you can drag it from the Toolbox and drop it on the page. You can also place the functions in the include file on the Toolbox. Even better, you can build code libraries into COM objects, then put references to methods on the Toolbox. All sorts of possibilities exist for using includes to speed up application development and application performance.

Related Articles

John Savill's Hyper-V Master Class

Join John Savill for 12 hours of comprehensive Hyper-V training. This master-level online training course will explore all the key aspects of a Hyper-V based virtualization environment covering both current capabilities in Windows Server 2012 R2 and looking at the future with Windows Server vNext.