When you think ASP, think...
Recent Articles xml
All Articles
ASP.NET Articles
Related Web Technologies
User Tips!
Coding Tips
spgif spgif

Sample Chapters
JavaScript Tutorials
MSDN Communities Hub
Official Docs
Stump the SQL Guru!
XML Info
Author an Article
spgif spgif
ASP ASP.NET ASP FAQs Feedback topnav-right
Print this page.
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.

For More Information
For a more in-depth look at ADOVBS.inc, be sure to check out this great article: What is Adovbs.inc and Why Do I Need It?

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!

FAQ Table of Contents   Using Includes Why ASP? 

ASP.NET [1.x] [2.0] | ASPFAQs.com | Advertise | Feedback | Author an Article