ASP 101 - Active Server Pages 101 - Web01
The Place ASP Developers Go!



Windows Technology Windows Technology
15 Seconds
4GuysFromRolla.com
ASP 101
ASP Wire
VB Forums
VB Wire
WinDrivers.com
internet.commerce internet.commerce
Partners & Affiliates
ASP 101 is an
internet.com site
ASP 101 is an internet.com site
IT
Developer
Internet News
Small Business
Personal Technology

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers

ASP 101 News Flash ASP 101 News Flash





FAQ for the Excel Data sample:


There's a reference to adovbs.inc in the code. What is it, why doesn't it work without it, and where can I get it?

When writing database related code in ASP, you're really using ADO (ActiveX Data Objects) which is Microsoft's set of components which provide programmatic database access. ADO defines a lot of different constants which you can use to make code more readable and easier to follow and debug. In order to use these constants in VBScript you need to define them. This is where adovbs.inc comes in.

The adovbs.inc file contains a list of the ADO constants and their numerical equivilents and when included in your ASP code, it defines them as constants so you have access to them in your code. There are a lot of these constants and most of our code is relatively simple database code so it only uses a few of them, but some you might recognize are adOpenStatic, adLockReadOnly, adCmdText, etc...

The reason the code doesn't work when you forget to include the file is that the constants the code uses aren't defined. The result is that incorrect values get passed to ADO and it doesn't know what to do with them.

In terms of getting a copy, you probably already have one! Do a search on your system for adovbs.inc and you'll almost certainly find the copy that was installed with ADO. If you can't find one you can get a copy of the one I'm currently using for the samples from here.

For more information about adovbs.inc you might want to read our article What is Adovbs.inc and Why Do I Need It?

Was your question not answered above?

Ask a new question

Please note: This form is only for submitting questions about the sample for us to consider including in the FAQ. If we feel the question merits inclusion, we will include it along with a reply. We will not respond to your email individually.


Home |  News |  Samples |  Articles |  Lessons |  Resources |  Forum |  Links |  Search |  Feedback

Internet.com
The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers