ADO - Connection.Version

Sometime around ADO 2.8 something happened - some of the web programs around the office broke. To be precise the web pages which downloaded ado record sets to the client computer started getting popup error messages. I started doing some checking around and found different versions of ADO on different computers.

Here’s the code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<script>
// this will get the version of ADO installed on the client computer.
var aCN = new ActiveXObject("ADODB.Connection");
document.write ("ADO=" + aCN.version + "");
</script>

<%
' ASP - tells you the version of ADO on the web server
dim cnnDC
set cnnDC =CreateObject("ADODB.Connection");

response.write "VB Script=" & ScriptEngineMajorVersion() _ & "." _
& ScriptEngineMinorVersion() _ & "." & ScriptEngineBuildVersion() & ""
response.write "ADO=" & cnnDC.version & ""
%>