Re: Distributing MDAC with VB Application

From: MikeD (nobody_at_nowhere.edu)
Date: 08/14/04


Date: Fri, 13 Aug 2004 21:27:07 -0400


"Ken" <kefford@tricom-tech.com> wrote in message
news:uO3Tc.95$AjN.42@news04.bloor.is.net.cable.rogers.com...
> Thanks very much for your help.
>
> It turns out that yes I am using the fm20.dll in this application, but I
did
> not know there was such a limitation or restriction. The provided link
> clarifies a great deal for me. I think this is exactly the problem. I
will
> remove it.

That would be highly recommended.

>
> In answer to your other questions,
> - yes, I am using both DAO3.6 and ADO in this application. Is this a
> problem?

It won't be if you're careful. The best advice I can give you as far as
using both DAO and ADO in your project is to be SURE to qualify object names
with the library name. This is because both libraries include objects with
the same name, for example, the Recordset object. If you don't qualify the
object with the library name, VB uses the object from the library with the
highest priority (as set in the References dialog). You should NEVER rely
on this "default" behavior. Just declare your variables and instantiate
objects like this:

Dim rsDAO As DAO.Recordset

Dim rsADO As ADODB.Recordset
Set rsADO = New ADODB.Recordset

This will save you a TON of grief. Trust me. I know this from experience,
as do many other programmers that have had to use both DAO and ADO in a
program. I once took over an app that used DAO, ADO, *and* RDO! All because
the company imposed no standards whatsoever, and any programmer that ever
touched the code was free to use whatever he/she wanted (and it was obvious
from coding styles that at least 4 or 5 different programmers had worked on
this app at one time or another). What a mess! Eventually, I re-wrote it to
use only ADO, but the "quick fix" was to just make sure objects were fully
qualified with the library name.

> - The version of MDAC_TYP.EXE is 2.8.
>
> Is there something else I need to include if using MDAC 2.5 or higher? I
> assumed that PDW would look after the dependencies. I also noticed that
the
> msjet40.dll is included in the CAB.

PDW should pick up all references for DAO, but not for ADO. When PDW
detects any reference to ADO, it just includes MDAC, which may or may not
include the Jet components ADO requires (such as the Jet OLEDB Provider).
IOW, you might have to distribute the Jet Components installer. The problem
is that for the latest version of Jet 4.0 (SP8), there are different
installers for each version of Windows. You can download them from:

http://msdn.microsoft.com/data/downloads/updates/default.aspx#jet

Also, PDW, or rather Setup1.exe, doesn't know to run the Jet installer
program. You'd need to customize Setup1 to do this....and customize it to
detect the version of Windows and run the correct installer for that version
of Windows.

Just to make sure you understand, it's MDAC 2.6 and later that don't include
Jet. MDAC 2.5 does. Therefore, unless there is a compelling reason to use
ADO 2.8 (or any version of ADO greater than 2.5), I recommend that you
reference ADO 2.5 and distribute MDAC 2.5. Even if you have MDAC 2.8
installed, it installs type libraries for earlier verions of ADO which you
can reference. To ensure you include MDAC 2.5 in your package, download the
2.5 version of mdac_typ.exe (from the page above) and copy that to your
"\VB98\Wizards\PDWizard\Redist" folder. Alternatively, you may just want to
includes MDAC on your distribution media, not install it during your app's
setup, and provide instructions to the user for manually installing MDAC. I
can't tell you what's best for your needs and your situation because it
depends on many things, one of which is your target audience (for example,
if this is an in-house app, all PCs might already have MDAC installed and
you needn't worry about installing it at all). I can just present you with
some suggestions and options.

Mike



Relevant Pages

  • Re: ADO and Jet creates error on XP Home Edition SP2
    ... For the JET error you mentioned, please take a look at the KB article at ... it appears to me the issues you are having is not really with ADO ... > database file with ADO: ... >> MDAC 28 RTM won't install. ...
    (microsoft.public.data.ado)
  • Re: DAO360.DLL - can I redistribute it?
    ... Older versions of MDAC include Jet 4.0...the newer ones do not. ... PC...whether or not you use ADO. ... schema used is common among the various database you might connect to. ...
    (microsoft.public.access.developers.toolkitode)
  • Re: ADO and Jet creates error on XP Home Edition SP2
    ... call Jet to compact access 97 files. ... database file with ADO: ... > MDAC 28 RTM won't install. ...
    (microsoft.public.data.ado)
  • Re: How do I distribute ADO/DAO without the full MDAC?
    ... I believe ADO must be installed via MDAC_typ.EXE... ... Bite the bullett and provide MDAC_Typ.exe for your client ... ... Visual Studio Installer for VS6 can do MDAC but I've read that you have ...
    (microsoft.public.vb.general.discussion)
  • Re: Which is the best single-user DB ?
    ... Jet SP is available from http://www.microsoft.com/downloads and Jet is ... installed on most computers even not being part of MDAC. ... There is also ODBC driver if you do not want to depend on ADO ... > Jet-Engine is DAO and no longer part of the MDAC installation, ...
    (borland.public.delphi.thirdpartytools.general)