Programmer's Guide to the Oracle Pro*C/C++ Precompiler Release 8.0 A54661_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:
Beginning with release 8.0, 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 "Pointer Variables" on page 3-41.
Pro*C/C++ now 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-30.
Starting with this release of Pro*C/C++, the precompiler supports multi-byte character sets (NCHAR) without database support, when NLS_LOCAL=YES. 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 after the C host declaration char. 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-60.
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 names for this release of Pro*C/C++. See "Programming Considerations" on page 4-43.
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 Object Code" on page 8-24.
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 unchangedwith an Oracle8 server. To upgrade to release 8 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.