Should I use ADOVBS.inc for declaring constants?
2673 Since 25th November, 2003
Select and Copy the Code
Sadly, VBScript does not understand ADO constants, such as AdLockReadOnly, the way VB does. Luckily (or
unluckily) for the developer, the immense number of constants for use with ADO is compiled in a file called
ADOVBS.inc. When starting out with database development, everyone is told to use the constant names (as opposed
to their integer counterparts), and to include ADOVBS.inc. This recommendation is given by many people, even if
you are only using 2 or 3 of the 393 constants that are listed in ADOVBS.inc.
These 393 constants result in an overall raw read size of 14,639 bytes. Never mind the amount of memory allocated
to holding all of those variables, most of which you have no intention of using. On a small, single-user app, you
won't see a difference. However, when you have 300 people on your site at once, every single user has to load that
15kb file, and every user has 393 extra page-level variables in memory... this can really add up.