1062-1064

Previous | Table of Contents | Next

Page 1062

You can embed OCI in a precompiled host program by following these steps:

  1. Declare the OCI Logon Data Area (LDA) outside the DECLARE section.
  2. Connect to Oracle using the embedded SQL statement CONNECT, not the OCI call OLOG.
  3. Call the Oracle runtime library routine SQLLDA to store the connect information in the LDA so the precompiler and OCI know they are working together.

The LDA data structures and function calls are language specific. Consult the Programmer's Guide to the Oracle Call Interface for complete information about this product.

SQL*Module

The Oracle SQL*Module compiler (version 1.1 was released with Oracle7.2) provides access to ANSI standard module language files and Oracle stored PL/SQL procedures through native function calls in Ada, C, and C++. It is 100 percent compliant with entry-level SQL92. It accepts names of PL/SQL stored procedures and reads call interface declarations. SQL*Module can be mixed or matched with OCI or Pro*Ada and Pro*C/C++.

Productivity, Security, and Performance

Programmer productivity is improved when you let SQL experts write database code and C experts write C code. SQL*Module works by converting the SQL modules into stored procedures, producing specification files that are included in 3GL source files. After you add the appropriate Oracle runtime libraries to the project build utility, the compile and link process works as usual. Security is enhanced by granting users EXECUTE privileges on the stored procedures, instead of giving direct access to data. Stored procedures also improve performance because you can compile them once and share them via the Oracle7 shared SQL cache.

Summary

Oracle precompilers provide an excellent tool for programmers to create dynamic applications. This chapter provided information on what a precompiler does, the benefits of embedding SQL statements in a 3GL host program, how to use a precompiler, and how to create a host program. It also introduced Oracle Call Interface and SQL*Module, two other products in the Programmer/2000 suite of productivity tools. Together with ODBC and Oracle Objects for OLE, the complete product suite making up Programmer/2000 provides application developers with complete access to Oracle databases without giving up any of the control found in 3GL languages.

Page 1063

Part XI


In This PART
  • Using PowerBuilder
  • Using SQLWindows
  • Using Visual Basic
  • Using Delphi
  • Using the AIS Web Development Suite

Integrating Oracle and Third-Party Tools

Page 1064

Previous | Table of Contents | Next


Oracle Unleashed
Oracle Development Unleashed (3rd Edition)
ISBN: 0672315750
EAN: 2147483647
Year: 1997
Pages: 391

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net