elziko:
Redistributing ADO, RDS, and other Microsoft Data Access Components correctly and safely with the Visual Basic 5.0 Application Setup Wizard is done by SHELLing out and running the MDAC_TYP.exe.
You may download the latest version of MDAC_TYP.exe from the following site:
MORE INFORMATION
This article assumes you have ADO is already installed on your computer.
The MDAC_TYP.exe setup includes only the binaries necessary to redistribute the components; it doesn't include documentation. This file can then be called from Setup1.frm's QueryUnload method.
Note that in addition to MDAC_TYP.exe, you may need to distribute DCOM95 for your Windows 95 clients. DCOM must be installed prior to the installation of MDAC. Note that Windows 2000, Windows NT 4.0, and Windows 98 have DCOM built in. You may download the latest version of DCOM95 from the following site:
Note that DCOM must be installed separately and before MDAC_TYP.exe and your Setup program. DCOM cannot be installed from within your Setup program.
How ADO and the Application Setup Wizard Interact
Currently, it is not possible to correctly install ADO/DB components with the Visual Basic Setup Wizard for Visual Basic 5.0 applications. This is due to several limitations in both ADO/DB required components and the Visual Basic Setup Wizard described below:
ADO and OLE-DB components, for future compatibility, must be registered in specific locations, for example:
\program files\common files\system\ado
\program files\common files\system\ole db
The Visual Basic Setup Wizard, when registering a DLL, does not change the directory to the location of the DLL being registered.
The OLE-DB DLL, Msdatl.dll, which is required for other OLE-DB components that ADO uses to register, is not self-registering. When Visual Basic attempts to register those DLLs, Msdatl.dll is not found in the "...\OLE DB" directory. Because the DLLs fail to register, ADO also fails to register.
The MDAC Setup may have to restart the system, depending on what the user has loaded in memory when setup is started. Thus, the Shell command is used to spawn the MDAC setup. Using SHELL allows for Setup1 and Setup to exit properly and to clean up after themselves.
Distributing ADO with the Application Setup Wizard
To redistribute your own ADO/DB-based project, complete each of the following steps: (You can safely ignore warnings about no dependency information for ADODB.)
The MDAC redistribution file is MDAC_TYP.exe, which includes the OLE DB providers for SQL Server, Access, and Oracle; the ODBC drivers for SQL Server, Access, and Oracle; ADO; and RDS.
Eric De Decker
vbg.be@vbgroup.nl
License And Copy Protection AxtiveX.
Download Demo version on my Site: