Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Eliminate the need for adovbs.inc
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Eliminate the need for adovbs.inc

 Post Reply Post Reply
Author
dpyers View Drop Down
Senior Member
Senior Member


Joined: 12 May 2003
Status: Offline
Points: 3937
Post Options Post Options   Thanks (0) Thanks(0)   Quote dpyers Quote  Post ReplyReply Direct Link To This Post Topic: Eliminate the need for adovbs.inc
    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



Edited by dpyers

Lead me not into temptation... I know the short cut, follow me.
Back to Top
thekiwi View Drop Down
Mod Builder Group
Mod Builder Group


Joined: 23 November 2003
Location: New Zealand
Status: Offline
Points: 392
Post Options Post Options   Thanks (0) Thanks(0)   Quote thekiwi Quote  Post ReplyReply Direct Link To This Post 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.asp101.com/articles/john/typelibs/default.asp
Back to Top
pmormr View Drop Down
Senior Member
Senior Member


Joined: 06 January 2003
Location: United States
Status: Offline
Points: 1479
Post Options Post Options   Thanks (0) Thanks(0)   Quote pmormr Quote  Post ReplyReply Direct Link To This Post Posted: 26 April 2004 at 5:32pm

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

Back to Top
dpyers View Drop Down
Senior Member
Senior Member


Joined: 12 May 2003
Status: Offline
Points: 3937
Post Options Post Options   Thanks (0) Thanks(0)   Quote dpyers Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
thekiwi View Drop Down
Mod Builder Group
Mod Builder Group


Joined: 23 November 2003
Location: New Zealand
Status: Offline
Points: 392
Post Options Post Options   Thanks (0) Thanks(0)   Quote thekiwi Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.