Pro*C/C++ Precompiler Programmer's Guide Release 8.0 A58233-01 |
|
This appendix lists the new features offered in the Pro*C/C++ Precompiler, release 8.0. Each new feature is described briefly, and a reference to the more complete description in the chapters is provided.
Topics are:
Pro*C/C++ supports the use of arrays of structs which enable you to perform multi-row, multi-column operations. With this enhancement, Pro*C/C++ can handle simple arrays of structs of scalars as bind variables in embedded SQL statements for easier processing of user data. This makes programming more intuitive, and allows users greater flexibility in organizing their data.
In addition to supporting arrays of structs as bind variables, Pro*C/C++ now also supports arrays of indicator structs when used in conjunction with an array of structs declaration. See "Arrays of Structs" on page 12-17.
Pro*C/C++ provides client applications with a convenient way to change a user password at runtime through a simple extension to the EXEC SQL CONNECT statement. See "Changing Passwords at Runtime" on page 4-32.
Pro*C/C++ supports multi-byte character sets (NCHAR) with database support, when NLS_LOCAL=NO. When NLS_LOCAL=NO, and the new environmental variable NLS_NCHAR is set to a valid National Character Set, the Oracle8 database supports NCHAR. See "Environment Variable NLS_NCHAR" on page 4-5.
The clause CHARACTER SET [IS] NCHAR_CS can be specified in character variable declarations. This has the same effect as naming the variable in the NLS_CHAR precompiler option. See "CHARACTER SET [IS] NCHAR_CS" on page 4-4.
A new clause, CONVBUFSZ, is available in the EXEC SQL VAR statement, for character set conversion. See "Using the EXEC SQL VAR and TYPE Directives" on page 3-61.
This option specifies the default mapping of C host char variables. Character strings are CHARZ (fixed-length blank-padded and 0-terminated) by default in Oracle8. For more information, see "National Language Support" on page 4-2.
SQLLIB functions have new aliases, which co-exist with the old function names for this release of Pro*C/C++. See "New Names for SQLLIB Public Functions" on page 4-35.
The DO BREAK and DO CONTINUE actions are now supported by the embedded SQL directive WHENEVER. See "Using the WHENEVER Statement" on page 11-24 and "WHENEVER (Embedded SQL Directive)" on page F-77.
Pro*C/C++ now allows you to map C structures to Object types that you defined for the Oracle8 server.
See Chapter 8, "Object Support in Pro*C/C++" for a description of how to access objects in a Pro*C/C++ program using an associative interface and a navigational interface (Executable Embedded SQL Extensions).
A sample program that illustrates how to access objects is listed in "Sample Code for Navigational Access" on page 8-25.
A new chapter describes the Object Type Translator (OTT) utility, which maps database object types to C structs for use in OCI and Pro*C/C++ applications. OTT is run before running the precompiler.
You can mix OCI function calls with embedded SQL statements in your application. New OCI interoperability functions, are available, as well as library routines to manipulate OCIString and OCINumber datatypes. For a description of Pro*C/C++ object support, see Chapter 8, "Object Support in Pro*C/C++".
See Chapter 16, "Using the Object Type Translator".
Existing applications written in Pro*C/C++ will work unchanged with an Oracle8 server. To upgrade to Oracle8 before adding new functionality to your application, re-link with the new SQLLIB library.
Pro*C/C++ release 8 applications will work with an Oracle7 server, if they do not use any new features.
When the new object support is added to an existing Pro*C/C++ application, use the OTT, the Pro*C/C++ release 8 precompiler, compile and link.