This appendix looks at the improvements and new features offered by the Oracle Precompilers Release 1.8. Designed to meet the practical needs of professional software developers, these features will help you build effective, reliable applications.
Fetching NULLs without Using Indicator Variables
With releases 1.5, 1.6, and 1.7 of the Oracle Precompilers, source files that FETCH data into host variables without associated indicator variables return an ORA-01405 message at runtime if a NULL is returned to the host variable. With release 1.8, when you specify MODE=ORACLE and DBMS=V7, you can disable the ORA-01405 message by also specifying UNSAFE_NULL=YES.
When developing applications for the Oracle7 Server, the preferred practice is to include indicator variables for any host variable that might have a NULL returned to it. When migrating applications from Oracle Version 6 to Oracle7, however, the UNSAFE_NULL option can significantly ease the process.
For more information, see "UNSAFE_NULL" and "Using Indicator Variables" Chapter 1 of your host-language supplement.
Applications precompiled with DBMS=V6 maintain full compatibility with Oracle Version 6. When upgrading to Oracle7, if you precompile with DBMS=V6 specified, your applications will be unaffected by the ORA-01405 messages.
Using DBMS=V7 and MODE=ORACLE
Applications precompiled with MODE=ORACLE and DBMS=V7 return the ORA-01405 error at runtime if a NULL is returned to a host variable when there is no associated indicator variable. When upgrading to Oracle7 with these options specified, you will need to migrate your applications in one of two ways:
- modify your source code to include the necessary indicator variables
If you are upgrading to Oracle7 and use DBMS=V7 when precompiling, or if you intend to use new Oracle7 features that are different from Oracle Version 6, in most instances, the change requires minimal modification to your source files. However, if your application may FETCH null values into host variables without associated indicator variables, specify UNSAFE_NULL=YES to disable the ORA-01405 message and avoid adding the relevant indicator variables to your source files.
- specify UNSAFE_NULL=YES on the command line
Related Error Messages
For information about precompile time messages associated with the UNSAFE_NULL option, see Oracle7 Server Messages..