Print Page | Close Window

Eliminate the need for adovbs.inc

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Database Discussion
Forum Description: Discussion and chat on database related topics.
URL: https://forums.webwiz.net/forum_posts.asp?TID=10109
Printed Date: 30 March 2026 at 6:02am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Eliminate the need for adovbs.inc
Posted By: dpyers
Subject: Eliminate the need for adovbs.inc
Date Posted: 23 April 2004 at 9:50am

If you have a site that uses ADO a lot, you have probably gotten annoyed by forgetting to include the adovbs.inc file in a script. This is a method of making the ADO constants available to all applications without using the .inc file.

Step 1 - Determine your version of MDAC/ADO by running the following code:

%>
dim objAdoVer
Set objAdoVer = Server.CreateObject("adodb.connection")
response.write "ADOVersion = " & objAdoVer.Version
Set objAdoVer = Nothing
%>

Step 2 - Insert one of the following tags before the first subroutine in your global.asa file.

For ADO 2.5 (came with Windows 2000 )

<!--METADATA NAME="Microsoft ActiveX Data Objects 2.5 Library" TYPE="TypeLib" UUID="{00000205-0000-0010-8000-00AA006D2EA4}"-->

For ADO 2.6 (came with SQL Server 2000 )

<!--METADATA NAME="Microsoft ActiveX Data Objects 2.6 Library" TYPE="TypeLib" UUID="{00000206-0000-0010-8000-00AA006D2EA4}"-->

For ADO 2.7 (came with Windows XP )

<!--METADATA NAME="Microsoft ActiveX Data Objects 2.7 Library"  TYPE="TypeLib" UUID="{EF53050B-882E-4776-B643-EDA472E8E3F2}"-->

For ADO 2.8 (came with Windows 2003 )

<!--METADATA NAME="Microsoft ActiveX Data Objects 2.8 Library" TYPE="typelib" UUID="2A75196C-D9EB-4129-B803-931327F72D 5C"-->

The downside is that you need a good host who will notify you in advance when they are going to upgrade MDAC. Most hosts run the latest version.

For more info and to download various MDAC/ADO versions - http://msdn.microsoft.com/data/downloads/default.aspx - http://msdn.microsoft.com/data/downloads/default.aspx



-------------

Lead me not into temptation... I know the short cut, follow me.



Replies:
Posted By: thekiwi
Date Posted: 26 April 2004 at 5:11pm
Good stuff.

Couple of external sites which have further info on how to implement:

http://www.4guysfromrolla.com/webtech/110199-1.shtml - http://www.4guysfromrolla.com/webtech/110199-1.shtml

http://www.asp101.com/articles/john/typelibs/default.asp - http://www.asp101.com/articles/john/typelibs/default.asp


-------------
Cheers
TheKiwi
http://www.infobahn.co.nz - Internet Infobahn - website design and hosting


Posted By: pmormr
Date Posted: 26 April 2004 at 5:32pm

hmm... never knew that, good find! I just copied them into Global.asa Application_OnStart method...



-------------
Paul A Morgan

http://www.pmorganphoto.com/" rel="nofollow - http://www.pmorganphoto.com/


Posted By: dpyers
Date Posted: 26 April 2004 at 6:19pm
For a long time I avoided using adovbs because it was 5-10 times bigger than a lot of the scripts I needed to include it in. Wound up just using the values for the constants which eventually became a maintenance nightmare - e.g. "What was I trying to do with a 5 in the third parameter?".

-------------

Lead me not into temptation... I know the short cut, follow me.


Posted By: thekiwi
Date Posted: 26 April 2004 at 6:20pm
Originally posted by dpyers dpyers wrote:

For a long time I avoided using adovbs because it was 5-10 times bigger than a lot of the scripts I needed to include it in. Wound up just using the values for the constants which eventually became a maintenance nightmare - e.g. "What was I trying to do with a 5 in the third parameter?".

Yea ... been there done that.


-------------
Cheers
TheKiwi
http://www.infobahn.co.nz - Internet Infobahn - website design and hosting



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net