OLE DB Query Sample

The OLEDB subdirectory 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 command window:

exec open library/filename

You can use "/" or "." depending on whether you are accessing a host mainframe or an AS/400 file. Note that if a "." appears in the host filename, then the filename must be enclosed in double quotes.

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, if certain OLE DB header and library files are not installed. The SNA Server 4.0 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 header files from the SDK\SAMPLES\OLEDB\INCLUDE directory on the SNA Server CD-ROM into your project.

adoid.h
adoint.h
msdadc.h
msdaguid.h
msdasql.h
oledb.h
oledberr.h
transact.h

If you do not have the OLE DB SDK version 1.5 installed, then you need to build your application using one of the following library files from the SDK\SAMPLES\OLEDB\LIB directory on the SNA Server CD-ROM. Note that different LIB files are supplied for i386 and Alpha processors.

OLEDB.LIB 
OLEDBD.LIB (debug version of OLEDB library)