Re: VB6: Which ADO version to reference?



WB wrote on Wed, 15 Mar 2006 13:25:31 -0800:

I have a VB6 app that was developed on an XP system, and it works fine.
However when I try to run it on Windows 2000, I was unable to connect to
our database.

I installed VB6 on the Windows 2000 system and discovered that the ADO
references for "Microsoft ActiveX Data Objects 2.8 Library"and "Microsoft
ActiveX Data Objects Recordset 2.7 Library" show up as MISSING. This makes
sense, of course, since Windows 2000 is older.

Install MDAC 2.8 on it. You can download it from http://www.microsoft.com/data

Or as already suggested switch to ADO 2.5. However, what happens when you
decide you want to run this app on a 9x or NT4 machine? Those don't natively
come with 2.5, and NT4 and 95/98 don't natively come with any ADO (although
I seem to remember IE5 adds ADO2.0 which is a mess because the DLLs aren't
compatible with ADO 1.5 or ADO 2.1 and higher, as it was only intended for
use inside IE).

I often compile my VB apps using the 2.1 reference, as I know that every
machine in this building has at least 2.1 installed. I think there are one
or two that don't yet have 2.5 (still running Windows 95 and they haven't
been updated yet). However, any apps I build knowing that they will be run
only on the Windows 2000, XP, and 2003 systems here I will use 2.8 for.

My question is: Should I reference an older version of ADO (2.1 is
supported
on Windows 2000) and hope that this older version will continue to work on
other operating systems (my app also needs to run on XP 64-bit, Vista
32-bit, and Vista 64-bit)? Should I somehow upgrade the ADO DLL & TLB when
running on Windows 2000?

Ideally, yes. This lets you use newer features that aren't in the older
versions. I'm assuming that Vista will include an ADO 2.8 library as XP/2003
does, but I don't know for sure. ADO was "replaced" by ADO.NET years ago,
and MS might decide that Vista will no longer support it to try and speed
the move from classic ADO and enironments like VB6 to the .NET platform.

Also, I have no idea if I need both the "Microsoft ActiveX Data Objects
2.8 Library"and "Microsoft ActiveX Data Objects Recordset 2.7 Library"
references. I just removed the "..Recordset 2.7 Library" reference and I
can still connect and read from the database, so it looks like I only need
the one reference.

The Recordset Library is a lightweight DLL if you're just going to be
dealing with recordsets only. If you need Connection or Command objects,
don't use it. I seem to remember the Recordset Library is aimed at use for
accessing remote or disconnected data, where you'd only normally be dealing
with a recordset that is passed to the client via XML or some other
non-direct connection method.

Dan


.



Relevant Pages

  • Re: Query error after converting
    ... If removing the reference to ADO solved the problem, ... I already mentioned that Recordset is an object in both the ADO and DAO ... libraries for much of its functionality, and any external library it uses is ...
    (microsoft.public.access.conversion)
  • Re: Export text file
    ... It is better to use just DAO and no ADO reference at all. ... recordset objects in the drop down list. ...
    (microsoft.public.access.externaldata)
  • Re: Help w/ Me Function? Or: concatenating a string for a ADO field reference?
    ... >Now I need that exact functionality in an ADO call: ... >ADO call? ... Me is an object reference to the form (technically the Class ... A recordset object's default collection is its Fields ...
    (microsoft.public.access.formscoding)
  • Re: Error Type Mismatch : Runtime error 13
    ... Both the DAO and ADO models have Recordset objects in them. ... You're trying to use DAO. ... Access 2000 and 2002 only have a reference ...
    (microsoft.public.access.forms)
  • Re: Need example of using ADO DataControl and DataGrid control - V
    ... MSDN is where I learnt ADO. ... Access SDK - Microsoft ActiveX Data Objects - ADO Programmers reference - ... ' Used to build the connection string & SQL string ... ' Set up the recordset. ...
    (microsoft.public.vb.database.ado)