Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org
#

Q5816 What is the adovbs.inc file used for?

You are here: irt.org | FAQ | ASP | Q5816 [ previous next ]

The adovbs.inc file which you often see in ASP is the VBScript constants definition include file for ActiveX Data Objects. All this file does is give more meaningful names to certain constants that exist when accessing databases.

For example, if you are retrieving records from a database and want to have the records marked as read-only, you open a recordset like Example 1. The lockType adLockReadOnly has an obvious meaning, your code is readable.

If on the other hand, you use the value (1) in this case you're going to have much less readable code. Plus what if the options change, much easier to do a search/replace on a unique name like adLockReadOnly than on a 1.

<% ' EXAMPLE 1 %>
<!--#include file="adovbs.inc"-->
<%
rs.source = "SELECT * FROM table1"
rs.lockType = adLockReadOnly
rs.open
%>

Feedback on 'Q5816 What is the adovbs.inc file used for?'

©2018 Martin Webb