a/d trends: OLE DB Best for Linking Windows Apps to AS/400
Have you ever wanted Windows 95/98/NT programs that work with your AS/400 system? If the answer is yes, take a serious look at OLE DB support. OLE DB support for Windows is provided with the Client Access release V3R1M3. This version of Client Access is now shipped with the V4R2 operating system.
There are two major concerns for creating AS/400 client/server applications: performance and development time.
Many access methods, like Data Access Objects, do not provide efficient and complete access to your AS/400 system. This could result in an ineffective use of network resources, which can also slow your network. ODBC also proves to be a major obstacle when programming for the AS/400. Applications using ODBC have been known to use network resources poorly, but some of that can be attributed to poor programming and to the Windows application itself.
Development time is a major concern for AS/400 client/server development, since it is difficult to create applications that access the underlying APIs. APIs allow for function not normally provided by the programming language and associated objects. To understand how to use these APIs, detailed information is needed about the responses and problems associated with their use. This can be rather time consuming and unnecessary.
However, Client Access OLE DB support provides a complete and robust set of functions which covers these aspects.
OLE DB, developed by Microsoft, is a single interface to all data. The Client Access OLE DB provider allows access to AS/400 data through the use of SQL or record-level access. OLE DB provides additional function by allowing access to AS/400 data with SQL statements and stored procedure calls, as well as access to the AS/400 Data Queue objects and CL commands and programs. OLE DB makes these operations transparent to the developer by using the necessary APIs.
OLE DB is now supported with Client Access 95/NT. It provides more enhanced features than the prior releases and is distributed to the clients as a run-time DLL with your Client Access Base support install. There are no additional components necessary for your programs to execute properly. The SDK may be used as an aid during development, but is not necessary. If it is used during development, the run-time DLLs do not need to be redistributed with the application.
The AS/400 Host Server must be installed before the OLE DB provider can be used. The host server is available on OS/400 V3R1 and later and is typically installed during setup. Additional host servers, such as the Optimized Database Server, DPC/RPC server, Optimized Data Queue or the DDM/DRDA server, may need to be installed for additional support.
OLE DB is available for any of the connectivity types supported by Client Access. These include SNA, TCP/IP and IPX. There are some limitations with these connectivity types. OLE DB over IPX programs are unable to use the record-level access function. Record-level access using TCP/IP, pre-V4R2, requires some additional setup.
To use the AS/400 with OLE DB, it first must be registered to the client PC. Registering is a process in which a run-time DLL is used to make the components it contains known to the Windows registry. This allows Windows to quickly access the components needed.
The SDK for ActiveX and OLE DB provides additional tools for the AS/400/Visual Basic programmer. The SDK provides a Visual Basic wizard for creating forms accessing AS/400 data. Code examples are provided for many popular OLE compliant programming languages like Visual Basic, Borland Delphi, C and C++, and PowerBuilder. Online documentation is also distributed with the SDK.
Client Access OLE DB provides AS/400 programmers with a robust set of tools, which can be used to create fast and efficient client/server applications eliminating the ugly green-screen applications. Client Access OLE DB has proven to be a fast and reliable alternative to ODBC.
It's a development solution that could be worth investigating if you want a system that runs at peak efficiency and makes the best use of resources, both human and technical.
To find out more about SDK for ActiveX and OLE DB, visit the OLE DB Website at http://www.as400.ibm.com/clientaccess/oledb
Mark Buchner is president and founder of Astech Solutions Inc. (Aurora, Ontario), which applies technology to the practical needs of the AS/400 market. email@example.com