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