HOWTO: Distributing RDS Client with Visual Basic Setup Wizard

ID: Q176874


The information in this article applies to:
  • Remote Data Service for ADO versions 1.5, 2.0, 2.1 SP2


SUMMARY

This article describes the steps to distribute the Remote Data Service (RDS) client files with a Visual Basic 5.0 application.

Starting with Microsoft Data Access Components (MDAC) 2.0, RDS has been incorporated into the Microsoft ActiveX Data Objects. RDS is now known as A Web Data Access Feature of ActiveX Data Objects.

All of the Microsoft Data Access Components are contained in a single redistributable, MDAC_TYP.EXE.

To ensure that your RDS clients have the RDS components, you should redistribute the proper version of the MDAC.

You can download the latest version of MDAC at the following site:

http://www.microsoft.com/data
Note that MDAC 1.5 is no longer available for download.

Once you've downloaded MDAC_TYP.EXE, you have two options for redistributing it:
  • Include MDAC_TYP.EXE in your setup program.

    For more information on distributing MDAC_TYP.EXE in your Setup program, please see the following article in the Microsoft Knowledge Base:


  • Q184265 HOWTO: Distribute ADO with the Application Setup Wizard
  • Run the MDAC_TYP.EXE as a standalone program. Note that DCOM must be installed before MDAC is installed. While Windows 2000, Windows NT 4.0, and Windows 98 have DCOM built in, you should ensure that your Windows 95 clients have installed DCOM before installing MDAC. You can download the DCOM95 redistributable from the following site:
    http://www.microsoft.com/com
    Note that DCOM95 must be run as a standalone program. You cannot include it in your Setup program.



MORE INFORMATION

Step One

Build the Test Visual Basic application. Assume that you are building this application on a computer that already has the proper RDS client files installed.

  1. Start a new Standard EXE project. Form1 is created by default.


  2. From the Project menu, select References, and then select Microsoft Remote Data Services Library.


  3. Add two CommandButtons to Form1, named Command1, and Command2 by default.


  4. Paste the following code into the General Declarations section of Form1:


  5. 
       Private Sub Command1_Click()
       'DataControl
       MousePointer = vbArrowHourglass
       Dim dc As New RDS.DataControl
       dc.Connect = "dsn=pubs;uid=sa;pwd=;"
       dc.SQL = "select * from authors"
       dc.Server = "<LINK TYPE="GENERIC" VALUE="http://ServerXXXX"">http://ServerXXXX"</LINK>
       dc.ExecuteOptions = adcExecAsync
       dc.Refresh
    
       While dc.ReadyState = 2
       DoEvents 'user has control during async query
       Wend
       MousePointer = vbDefault
       MsgBox dc.Recordset.Fields(0).Value
       End Sub
    
       Private Sub Command2_Click()
       'DataSpace, DataFactory
       MousePointer = vbArrowHourglass
       Dim ds As New RDS.DataSpace
       Dim df, rs
       Set df = ds.CreateObject("RDSServer.DataFactory",
       "<LINK TYPE="GENERIC" VALUE="http://ServerXXXX")">http://ServerXXXX")</LINK>
       Set rs = df.Query("dsn=pubs;uid=sa;pwd=;", "select * from authors")
       MsgBox rs.Fields(0).Value
       MousePointer = vbDefault
       End Sub 
  6. Change the Server, SQL, and Connect strings to match actual servers you will be testing against.


  7. Save the project.


  8. Run the project and test its functionality against your server to verify that it works. If it does not work at this time, do not continue to Step Two below until you have figured out what is wrong. The RDS documentation, Readme.txt, and other Microsoft Knowledge Base articles will help you debug RDS configuration problems.


Step Two

Build the distributable application using the Visual Basic Application Setup Wizard.
  1. Optionally, include MDAC_TYP.EXE in your Setup program. See the REFERENCES section of this article for more information.


  2. Whether you include MDAC_TYP.EXE in your Setup program or not, you do not need to include separate Remote Data components in your Setup program. So, when running the Application Setup Wizard, remove the reference to Microsoft Remote Data Services Library (msadco.dll). This file and all other RDS files are included in MDAC_TYP.EXE.


  3. On a computer that has never had any RDS files installed, test the functionality of your example program by running the Setup.exe file that the Application Setup Wizard created. Be sure that DCOM is installed prior to installing MDAC.


© Microsoft Corporation 1999, All Rights Reserved.
Contributions by Jon Fowler, Microsoft Corporation


REFERENCES

For more information on distributing MDAC_TYP.EXE in your Setup program, please see the following article in the Microsoft Knowledge Base:

Q184265 HOWTO: Distribute ADO with the Application Setup Wizard
For more information on installing DCOM before installing MDAC, please see the following article in the Microsoft Knowledge Base:
Q191704 PRB: Unable to Load File to Register It During Setup

Additional query words:

Keywords : kbDatabase kbRDS kbRDS200 kbGrpVBDB kbGrpMDAC kbDSupport kbRedistribute kbRDS210SP2 kbMDAC210SP2
Version : WINDOWS:1.5,2.0,2.1 SP2
Platform : WINDOWS
Issue type : kbhowto


Last Reviewed: November 2, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.