420 likes | 601 Views
Client Access Express Features: MS Access Integration with iSeries Data. Sign on the AS400 and type crtlib DT followed by your userid. Type addlible DT youruserid. Type CPYF press F4 and complete the parameters as below then press Enter. File is CSCSTP, Library RPGLEDATA.
E N D
Client Access Express Features:MS Access Integration with iSeries Data
Sign on the AS400 and type crtlib DT followed by your userid.
Type CPYF press F4 and complete the parameters as below then press Enter. File is CSCSTP, Library RPGLEDATA Use your new library name *YES
ODBC • Open Database Connectivity • Data-access standard created by Microsoft • Several layers: • Application • Driver manager: manages the individual ODBC drivers installed on your system • ODBC driver: programs that perform the translation between the external data source and the ODBC programming interface; offer remote database access for ODBC compliant-application programs • Data sources: DB2/400, Oracle, SQL Server
Client Access Components • ODBC: Part of the base support of Client Access, a primary method used by MS Office apps to retrieve data from external data sources Two ways to get to the ODBC Administration: Control Panel Client Access Express • Data Transfer Function: can be automated
Access the ODBC Administration via the Control Panel:Click Performance and Maintenance
Data sources: named connections to a database • DSN refers to a named data source. • Three different types of data source names, each allowing different access • User DSNs: available to the current user & other users with authorized access • System DSNs: available to the OS and anyone using the system • File DSNs: available to anyone using the system with the proper drivers installed
One-time step to allow access to system using a Client Access ODBC Driver - - - already done!
Create a data source that points to the AS/400 database, click User DSN tab is it is not already selected. Click the Add button.
Select the Client Access ODBC Driver (32-bit) and click Finish
Give the data source the name DevTrends then Connection Options
Click Server, type the name of the new in the Library List then click Advanced
Live data vs. transfer data • Is online up-to-date information required? • Is the data too big to exist on the PC? • Data transfer may not provide the needed functionality • Use Data Transfer Function if: • Offline data access is required or desired • No ODBC client utilities are available to perform the transfer • ODBC security is a concern
Click File, Get External Data, Import, Files of type ODBC Databases
Click Machine Data Source, Dev Trends, and OK Sign on the AS/400
Select the table prefixed with your new DT library and the file name CSCSTP, click OK.
Note the new table imported, double click to view in datasheet view
Using the same Access database,click File, Get External Data, Link Tables
Change the name of the first record CCITY and CSTATE and close the table to save
Open the table again, and verify that the changes were saved.
Note if the ODBC update fails It is because the Advanced Server settings were not changed.
Summary: ODBC can be used to provide access to AS400 data from other applications. Decisions must be made as to whether the ODBC connection should allow updates or should be read-only. Decisions must be made as to whether the data is imported (pull type of feed) or if it is to remain on the AS400 and accessed from the application ‘live’. Both import and linked tables were created in this lab exercise.