Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map
irt.org logo

Q5816 What is the adovbs.inc file used for?

irt.org | Knowledge Base | ASP | Q5816 [ previous next ]

Q5816 What is the adovbs.inc file used for?

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?'


Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 30th March 2008. Maintained by: Martin Webb
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2008 irt.org, All Rights Reserved.