You are on page 1of 5

DAO Installation

This document describes the steps required to create a setup program that successfully installs DAO and its related files. It is recommended that you use InstallShield Express which ships with !"" #.$ with the information in this document to create your setup. %roper setup of DAO is &ery important. 'ecause DAO is a shared component that only exists in one location on a machine( all applications using DAO may stop wor)ing if DAO setup is not done correctly.

Introduction
To distribute an application that uses DAO, you must install the redistributable portions of DAO. Depending whether your application uses the Microsoft Jet Engine or ODB Direct wor!spaces, you must also install either the redistributable portions of the Microsoft Jet Database Engine, or the redistributable portions of the "emote Database Ob#ects $"DO% or both. DAO, Microsoft Jet, and "DO re&uire a more comple' installation procedure than simply copying files into a directory. An application cannot ha(e its own )pri(ate* copy of an O+E Automation ser(er $such as DAO% in an application directory. The ser(er is registered by O+E, and all users use the same D++.

Files
DAO and DAO,s ODB Direct each re&uire a core set of files. Microsoft Jet also has a core and a second optional set that pro(ides the ability to access other data formats. -hether your application uses ODB Direct or the Microsoft Jet Engine to access data determines if you will install the Microsoft Jet Engine or ODB Direct files. Only the files described in this section can be distributed with your application to other users. You cannot distribute other files, such as .hlp files or DAO header (.h) files. Note: The DAO directory and Syste !" directory are e#plained in section !.".

DAO
DAO is comprised of the following core files. These files must be installed for DAO to function. $ile DAO./0.D++ DAO3/./.T+B M1JTE"./.D++ M1J65T./.D++ M18 "T90.D++ Description DAO (ersion ../ DAO (ersion 3./4../ Bac!ward ompatible Type +ibrary Microsoft Jet $and DAO% error message D++ +ocali7ed Microsoft Jet $and DAO% error strings "untime D++ %nstalled 1hared ompanion to DAO./0.dll 1ystem 1ystem 1ystem &e'istered 2es 5o 5o 5o 5o Directory DAO DAO 1ystem.3 1ystem.3 1ystem.3

Microsoft Jet Engine Core Jet files


Microsoft Jet is comprised of the following core files. These files are sufficient to access (ersion ..0 .MDB databases and ODB data sources $in con#unction with an installed ODB dri(er% when installed with DAO. $ile M1JET./.D++ M1"D3:./.D++ M1JTE"./.D++ M1J65T./.D++ Description Microsoft Jet engine $(ersion ../% MDB files from Microsoft Access 3.0, 8isual Basic ..0 or earlier Microsoft Jet $and DAO% error message D++ +ocali7ed Microsoft Jet $and DAO% error strings %nstalled 1ystem ompanion to M1JET./.dll 1ystem 1ystem &e'istered 2es 2es 5o 5o Directory 1ystem.3 1ystem.3 1ystem.3 1ystem.3

8BAJET.3.D++ E'p1r(.D++

8BA;Microsoft Jet E'pression ser(ice 8BA "untime

1ystem 1ystem

5o

1ystem.3

Optional files
The following optional files pro(ide access to other data formats. 6nstall the D++s that correspond to the file format you need to support, or if you need replication support. (odule M1"E<+./.D++ M1:B1E./.D++ M1<DO:./.D++ M1TE:T./.D++ M1E: +./.D++ M1+T=1./.D++ M1E: >./.D++ Description Microsoft Jet "eplication :base formats <arado' formats Te't files 1preadsheet files +otus formats E'change formats %nstalled 1ystem 1ystem 1ystem 1ystem 1ystem 1ystem 1ystem &e'istered 5o 2es 2es 2es 2es 2es 2es Directory 1ystem.3 1ystem.3 1ystem.3 1ystem.3 1ystem.3 1ystem.3 1ystem.3

ODBCDirect
6nstall the following files for supporting ODB Direct functionality. DAO uses "DO to handle it,s ODB Direct functionality. ?or this reason you may recogni7e these files as the core "DO files. $ile M1"DO30.dll "DO ="1.dll Description "emote Database Ob#ects 3.0 Batch lient ursor +ibrary %nstalled 1hared ompanion to M1"DO30.dll &e'istered 2es 2es Directory 1ystem.3 1ystem.3

Installation
The following sections pro(ide information on using the installation procedure.

Check if files are in use


The first step in the installation procedure is to see if programs that are using any files you may be installing are running. 6f they are you may need to abort the installation and re&uest the user to close other applications before installing DAO.

Copy Files
opy all files listed as DAO files $e'cept the DAO./0.dll and DAO3/./.tlb% and all Microsoft Jet Engine core files $and application specific optional files% or ODB Direct files $depending upon the needs of your application% to the system $system.3 for 5T% directory $referred to in the abo(e charts as the 1ystem.3 directory%. <er usual D++ standards, you need to copy with (ersion chec!ing to ma!e sure a newer (ersion of the file is not o(erwritten by your installation. All the DAO files contain appropriate (ersion resources. =se the following procedure to copy DAO./0.D++ and DAO3/./.tlb@

A. ?or -indows 5T $earlier (ersion than 9.0%, the DAO files always go into
<windows>\MSAPPS\DAO. ?or e'ample, c:\winnt35\msapps\DAO.

?or -indows B/ or -indows 5T 9.0, the DAO directory is appro'imately c:\Program Files\Common Files\Microsoft S ared\DAO. The e'act location (aries if the user has a non;English (ersion of -indows B/, which re&uires that the location be read from the registry. +ocate the following node in the registry@ >CE2D+O A+DMA >65EE1oftwareEMicrosoftE-indowsE urrent8ersion and retrie(e the (alue of the !ey named ommon?ilesDir.

3. 6f this registry !ey does not e'ist, then create it and set the (alue to@
E<rogram ?ilesE ommon ?iles $ma!ing sure to use the correct dri(er letter%.

.. After you ha(e the (alue of the !ey, which will typically be@ c:\Program Files\Common
Files, then append )\Microsoft S ared\DAO* and use that as the destination location for the dao35!"dll and dao#535"tl$.

9.

opy dao35!"dll and dao3/./.tlb to this directory using (ersion chec!ing. This is the Directory referred to in the abo(e charts as the DAO directory.

Register DLLs
After all the D++s ha(e been copied, they need to be registered. This is done by calling the D++"egister1er(er entry point on each D++ if it e'ists. 5ote that because DAO re&uires Microsoft Jet before it can successfully register , the order of copying files gi(en pre(iously is important. 2our setup program should use regs(r.3.e'e or an e&ui(alent call to e'ecute the D++"egister1er(er within the following dlls $if they ha(e been installed by step ..3%@ DAO./0.dll, M1JET./.dll, M1"D3:./.dll, M1E: +./.dll, M1<DO:./.dll, M1:B1E./.dll, M1+T=1./.dll, M1TE:T./.dll, M1E: >./.dll, M1"DO30.dll. There are some special considerations you should !eep in mind.

DAO./0.dll needs to ha(e M18 "T90.dll and other re&uired files on the computer before it can register. M1"DO30.dll needs to ha(e ODB installed before it will register. =se the ODB 6nstallation program to install ODB . M1E: >./.dll will need MA<6 installed on your system before it can register.

pdate File Reference Counts


Because DAO is shared by many programs, a count is !ept of how many times the D++ has been installed. This allows uninstall programs to remo(e the file only when no other program needs it. This is the same for the M1"DO30.dll. The other files are ne(er remo(ed from the system.

/. =nder the following location, search for a !ey with the same name as the file you,(e installed@
>CE2D+O A+DMA >65EE1O?T-A"EEMicrosoftE-indowsE urrent8ersionE1haredDllsE

F. 6f the !ey e'ists, increment its (alue by one $it is a dword%. 6f the !ey does not e'ist you need to create
a !ey which is the name of the file $including path% of type dword and gi(e it a (alue of A. A typical entry would be@ EE<rogram ?ilesEE ommon ?ilesEEMicrosoft 1haredEEDAOEEDAO./0.D++GHdword@0000000A $This e'ample is in the e'port format used by regeditI you would only use single bac!slashes when creating the !ey.%

Ma!e sure you reference count both the M1"DO30.dll and the DAO./0.dll.

ninstall
To conform with -indows B/ guidelines, programs must be able to uninstall themsel(es and remo(e any files and registry entries they create. Many setup tool!its, such as the pro(ided 6nstall1hield tool!it, pro(ide this as )built;in* functionality. 6t is beyond the scope of this document to pro(ide all the details of -indows B/ installation re&uirements, but here are the basic steps re&uired to uninstall DAO. 5ote that only the shared components and their companion files will be remo(ed the files installed system will ne(er be remo(ed. The DAO./0.D++ and DAO3/./.tlb will be remo(ed only if the (alue of DAO./0.dll,s reference count !ey is A. Otherwise the count is decremented and the file left in place.@ >CE2D+O A+DMA >65EE1O?T-A"EEMicrosoftE-indowsE urrent8ersionE1haredDllsE G @E<rogram ?ilesE ommon ?ilesEMicrosoft 1haredEDAOEDAO./0.D++G Before remo(ing DAO./0.D++, you need to call its entry point D++=nregister1er(er so that it can remo(e its entries from the registry. This can be done by using regs(r.3.e'e with the ;u option. The same rules apply for the M1"DO30.dll and it,s companion file of "DO ="1.dll.

You might also like