Re: VB6: Which ADO version to reference?
- From: "Daniel Crichton" <msnews@xxxxxxxxxxxxxxxxxx>
- Date: Thu, 16 Mar 2006 09:57:33 -0000
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
.
- Follow-Ups:
- Re: VB6: Which ADO version to reference?
- From: Richard Mueller
- Re: VB6: Which ADO version to reference?
- Prev by Date: SQLOLEDB with Server=(local) on SQL Server 2005
- Next by Date: Re: Which ADO version to reference?
- Previous by thread: SQLOLEDB with Server=(local) on SQL Server 2005
- Next by thread: Re: VB6: Which ADO version to reference?
- Index(es):
Relevant Pages
|
|