ADOVBS.inc... use it!
ADOVBS.inc is a file included with IIS that has all of the ADO constants
defined. When you visit this web site and other related sites, you'll find a lot of
ASP sscripts, that, when connecting to databases, use constants with names like
adOpenForwardOnly and adLockReadOnly. These are
constants that are defined in the ADOVBS.inc file and define various connection and
recordset properties with English-like names.
It may seem out of place that I am recommending that you include a file
that relates to ADO (which I've yet to discuss), but it is good to get in
the habit of including ADOVBS.inc on your ASP pages.
To includ ADOVBS.inc, all you need to do is add one simple line to the top
of your ASP pages:
<!--#include virtual="/adovbs.inc"-->
and be sure to put ADOVBS.inc in your root web application directory.
You can download ADOVBS.inc from this site in streaming text format.
Here is a snippet of the contents of ADOVBS.inc
'--------------------------------------------------------------------
' Microsoft ADO
'
' (c) 1996-1998 Microsoft Corporation. All Rights Reserved.
'
'
'
' ADO constants include file for VBScript
'
'--------------------------------------------------------------------
'---- CursorTypeEnum Values ----
Const adOpenForwardOnly = 0
Const adOpenKeyset = 1
Const adOpenDynamic = 2
Const adOpenStatic = 3
'---- CursorOptionEnum Values ----
Const adHoldRecords = &H00000100
Const adMovePrevious = &H00000200
Const adAddNew = &H01000400
Const adDelete = &H01000800
Const adUpdate = &H01008000
Const adBookmark = &H00002000
Const adApproxPosition = &H00004000
Const adUpdateBatch = &H00010000
Const adResync = &H00020000
...
Note that you can also automatically include ADOVBS.inc in all of the pages on your Web site
using the METADATA tag in your Global.asa file. For more information on using
the METADATA tag, be sure to read: Using METADATA to
Import DLL Constants!