Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

Use the DRDA_VB sample for DB2OLEDB


View products that this article applies to.

This article was previously published under Q271131

↑ Back to the top


Summary

This article describes how to test drive the OLE DB Provider for DB2 feature of Host Integration Server 2000 and Host Integration Server 2004 by using the demonstration host link services.

↑ Back to the top


More information

The following steps are necessary to test drive the OLE DB Provider for DB2 feature of Host Integration Server 2000 and Host Integration Server 2004 by using the demonstration host link services:
  1. From the Microsoft SNA Manager, add a new DEMO SDLC Link Service, by choosing the DB2OLEDB script file.
  2. From the Microsoft SNA Manager, right-click the server name and click AS/400 Wizard on the All Tasks menu. Configure a new connection as follows:
    • SNA Service: (Select server name.)
    • Connection Name: DRDADEMO
    • Link Service: (Select Link Service created in step 1.)
    • Network Name: APPN
    • Control Point Name: DRDADEMO
    • SDLC settings: (Leave as default.)
  3. From the Action menu in Microsoft SNA Manager, click Save Configuration, and then start the SNA Service. The newly-created DRDADEMO connection should go to On Demand status.
  4. From the Run line of the Start menu, type drda_vb, and then click OK to load the ADO Microsoft Visual Basic consumer sample application.
    1. Click Connect to use the ADO Connection.Open method. This action establishes an APPC session between the OLE DB Provider for DB2 computer and the demonstration AS/400.
    2. When you are prompted to use an existing data link file, click Yes. When you are prompted to enter the path to the data link file, use the following, and then click OK:
      c:\program files\common files\system\ole db\data links\drdademo.udl
      (This path may vary depending on the systemand the path specified during the installation of Host Integration Server 2000/2004) .)
    3. Click Open RS to use the ADO Recordset.Open method.
    4. In the Open dialog box, enter SELECT * FROM PUBS.AUTHORS, and then click OK to continue.

      The recordset is composed of the records in the "AUTHORS" DB2/400 table in the DB/400 collection "PUBS", sorted by the first column AU_ID. The sample DB/400 data is based on the authors table from the Microsoft SQL Server pubs sample database.
    5. Click Next to sequentially access all of the records in the table.
    6. Click Close RS to close the host file by using the ADO Recordset.Close method.
    7. Click Disconnect to end the APPC session by using the ADO Connection.Close method.
    8. Exit the ADO consumer sample application.
The current off-line script can be used to demonstrate a simple Visual Basic application, Active Server Page application, or Visual Basic component. It also works with well-known tools such as RowsetViewer. Unfortunately, the off-line demonstration script playback capabilities are insufficient to support demonstrating complex consumers such as SQL Server Data Transformation Services or Distributed Query Processing.

↑ Back to the top


Keywords: KB271131

↑ Back to the top

Article Info
Article ID : 271131
Revision : 4
Created on : 12/4/2007
Published on : 12/4/2007
Exists online : False
Views : 325