README.TXT

PRODUCT NAME: Microsoft (R) SNA Server 
FEATURE NAME: Microsoft(R) OLE DB Provider for AS/400 and VSAM
VERSION NUMBER: 4.0


This document contains answers to the most commonly asked
questions about using and building the sample applications
included with the Microsoft OLE DB Provider for AS/400 and
VSAM. Please take a few moments to read this document.

***********************
*IMPORTANT INFORMATION*
***********************

The \SAMPLES directory includes subdirectories
containing the following utilities and information:


The file named SAMPLE.HCD contains examples of the host
column definitions required to access host VSAM files. This file
is documented in the Microsoft SNA Server SDK, in the section
titled Microsoft OLE DB Provider for AS/400 and VSAM.


OLE DB Sample
The OLEDB directory contains a modified Microsoft OLE DB Query
Sample application. This application allows you to connect
to the Microsoft OLE DB Provider for AS/400 and VSAM, open a table window,
type the host file name, return a rowset and browse the contents.
You can navigate the table, using seek and set range on
indexed files.

To open a rowset, type the following command in the comamnd window:
exec open library/file
You can use "/" or "." depending on whether you are accessing a host
mainframe or AS/400 file.

This sample is written to access bookmarkable file types only. You will
not be able to access mainframe SAM, ESDS, PDS/PDSE because these data
set types do not support bookmarks.

You may not be able to build this sample application. The SNA Server
CD-ROM does not include a copy of the OLE DB SDK version 1.5. If you
do not have the OLE DB SDK version 1.5 installed, then you need to
include or copy the following files, from the SDK\SAMPLES\OLEDB
directory on the SNA Server CD-ROM, into your project.

SDK\SAMPLES\OLEDB\INCLUDE
adoid.h
adoint.h
msdadc.h
msdaguid.h
msdasql.h
oledb.h
oledberr.h
transact.h


ADO Visual Basic Sample
The ADO_VB directory contains a Microsoft OLE DB Provider for
AS/400 and VSAM ADO Visual Basic version 5.0 sample application.
This application allows you to open a connection through the
Microsoft OLE DB Provider for AS/400 and VSAM, open a recordset
and browse the records of a host file. This sample is built
with ActiveX Data Objects version 1.5. Before building with
Visual Basic sample, be sure to include the Microsoft ActiveX
Data Objects 1.5 Library in your project. You can do this from
inside the VB IDE by selecting References on the Project menu.

The sample application can be built with Microsoft Visual Basic
version 5.0.


ADO VBScript Sample
The ADO_VBS directory contains a Microsoft OLE DB Provider for
AS/400 and VSAM ADO VBScript sample web client application.
This web client application allows you to open a connection
through the Microsoft OLE DB Provider for AS/400 and VSAM,
open a recordset and browse the records of a host file.


Active Server Pages Sample
The ASP directory contains two Microsoft OLE DB Provider for
AS/400 and VSAM Active Server Pages sample web server applications.
These applications require Microsoft Internet Information Server
version 3.0 or higher with Active Server Pages installed.

1. REPORT.ASP will return and display the first ten (10) records in a host file
to a client browser in a table view.

2. OLEDBDDM.ASP and GLOBAL.ASA combine to display columns of a host file
in a a form view.

You will need to edit the host table names in order to use these samples
in your environment.


Off-Line Demo Link Service
The following are the steps necessary to test drive the OLE DB Provider for
AS/400 and VSAM feature of SNA Server 4.0 using the demo host link services.
To demonstrate the OLE DB Provider for AS/400 and VSAM with Visual Basic, all you
need is the sample VB program that is installed with the provider.

1. From the Microsoft SNA Server Manager, add a new Link Service, choosing the
"SNA OLE DB Demo" script file.
2. From the Microsoft SNA Server Manager, select the AS/400 Wizard from the Tools menu.
Configure a new connection (using the above Link Service) as follows:
- Network Name: APPN
- Control Point Name: DDMDEMO
- SDLC settings: (leave as default)
- Connection Name: DDMDEMO
- Remote APPC LU Alias: DDMDEMO
- Local APPC LU Alias: LOCAL
3. From the Microsoft SNA Server Manager, start the SNA Server Service. The
newly-created "DDMDEMO" connection should go to "On Demand" status.
4. From the SNA OLE DB Management console, create a new Data Source as follows:
- Data Source Type: AS/400
- Remote LU Alias: DDMDEMO
- Local LU Alias: LOCAL
- APPC Mode: QPCSUPP
- RDB Name: DDMDEMO
- Default Library: PUBS
- Host CCSID: 37
- Host Column Description: (leave as default "unselected")
5. From the Run line of the Start menu, type "ado_vb" and click OK to load the ADO VB consumer sample application.
- Click the Connect button to use the ADO Connection.Open method. This will establish an APPC session between the OLE DB Provider for AS/400 and VSAM computer and the demo AS/400.
- Enter "USERID" and "password", then click OK to log onto the demo host.
- Click the Open button to use the ADO Recordset.Open method.
- In the open dialog, enter "pubs/authors", then click OK to continue. The recordset is composed of the records in the "authors" AS/400 physical data file in the AS/400 library "pubs". The sample AS/400 data is based on that in the authors table from the Microsoft SQL Server pubs sample database.
- Click the Next button to view the next record in the recordset using the ADO Recordset.MoveNext method.
- Click the Close button to close the host file using the ADO Recordset.Close method.
- Click the Disconnect button to end the APPC session using the ADO Connection.Close method.
- Exit the ADO consumer sample application.


Last updated on 11/21/97. (C) Microsoft Corporation