📄 readme_proc.txt
字号:
/ $Header: readme.doc 19-apr-02.09:27:33 apopat Exp $/ / Copyright (c) 1992, 1996, 1997, 1998, 1999, 2001, 2002 by Oracle Corporation README FILE FOR PRODUCT Pro*C/C++ RELEASE 9.2.0---------------------------------------------------------------------------------------------- This file contains important information regarding Pro*C/C++ Version 9.2.0 (9i Release 2), which is the precompiler release corresponding to 9.2.0 Oracle database. These notes are divided into the following five sections: o Section 1 describes compatibility issues when migrating from earlier releases of Pro*C/C++. o Section 2 briefly describes the new functionality introduced in this release of Pro*C/C++. o Section 3 describes the known bugs associated with this release. o Section 4 describes the bugs that have been fixed in this release. o Section 5 lists restrictions and limitations in Pro*C/++ 9.2.0. It also provides some usage tips for the new host variable types introduced in this release and describes a few other miscellaneous issues.SECTION 1: COMPATIBILITY AND MIGRATION ISSUES------------------------------------------------------------------------------------------Desupport Notification for V6 Compatibility Behavior----------------------------------------------------With Oracle7, Oracle offered a Version 6 [V6] Compatibility flag that allowed application developers developing Oracle7 applications to emulate Oracle6 behavior. Beginning with the release of Oracle 8.0.3, users are cautioned that the Version 6 compatibility flag is being desupported effective immediately inall of the Oracle8 products including PL/SQL8, all the Oracle Precompilers,the Oracle8 Oracle Call Interface, SQL*Module, and SQL*PLUS. The desupport ofthe V6 compatibility flag is consistent with Oracle's policy of supporting backwards compatibility and behavior from one version release upgrade to another i.e. from Oracle6 to Oracle7 but not for more than one version release upgrade.Specifically, the V6 Compatibility flag emulated the following aspects of Oracle6 behavior with Oracle7: o String literals are fixed length in Oracle7 but are treated as variable length with the V6 flag o PL/SQL Local char variables are fixed length in Oracle7 but are treated as variable length with the V6 flag o Return value of SQL Functions (e.g. USER) are fixed length characters in Oracle7 but are treated as variable length characters with the V6 flag o Select/Fetch of a NULL with no indicator raises an ORA-1405 error with Oracle7 but returns no error with the V6 flag o SQL group function is called at FETCH time with Oracle7 but is called query execution time with the V6 flag o Describe of a fixed length string returns Type=96 with Oracle7 but returns Type=1 with the V6 flagAll of these behaviors are being desupported with the desupport of the V6 Compatibility Flag with Oracle8.SQLLIB Migration to use Oracle 8.1 OCI----------------------------------------Beginning with release 8.1, SQLLIB uses V8OCI to communicate with thedatabase. This change gives rise to the following compatibility issues: o All host variables must be initialized prior to executing the PL/SQL block. This is true regardless of the underlying mode (IN, IN/OUT, OUT) of the variable from the PL/SQL perspective. This requirement was instigated to improve performance when executing embedded PL/SQL. o Applications using the OCI interoperability functions sqlcda() and sqlcur() (SQLCDAFromResultSetCursor and SQLCDAToResultSetCursor) must call either sqllda() or sqlld2() (SQLLDAGetCurrent or SQLLDAGetNamed) immediately after establishing a connection through embedded SQL. For example: sql_cursor curvar; Lda_Def lda; Cda_Def cda; EXEC SQL CONNECT :uid IDENTIFIED BY :pwd; /* This function must be executed immediately after connecting */ SQLLDAGetCurrent(&lda); /* Continue with logic to allocate, open a fetch using curvar */ EXEC SQL ALLOCATE :curvar; EXEC SQL EXECUTE BEGIN open :curvar for select ename from emp order by empno; END; END-EXEC; EXEC SQL FETCH :curvar INTO :name; sqlcda(&cda, (dvoid *)&curvar, &code); ofetch(&cda); This will put the connection in "v7 mode" so the conversion between a precompiler cursor variable and a v7 Cda_Def is possible. Note that Universal Rowids (OCIRowid *) may not be used if the connection is in V7 mode. Note that users should not mix calls to sqllda, which imply v7 mode processing, with calls to SQLSvcCtxGet or others which imply v8 processing. sqllda support is provided only for backwards compatibility. o ROWIDs A describe (EXEC SQL DESCRIBE SELECT LIST . . .) for a ROWID column now returns type SQLT_RDD instead of SQLT_RID. In general, programmers should use Universal Rowids (type OCIRowid *) in all new development. This will enable the underlying table to be migrated from a heap table to an index organized table with no change to application code. o When a null is fetched and an indicator variable is present, the contents of the corresponding host variable is untouched. You must check the value of the indicator variable to determine the NULL/NOT NULL status. o When a null is selected or fetched into a host variable with no corresponding indicator variable, the query processing does not stop. Subsequent rows are still retrieved into the users host variables and the rows processed count reflects the total number of rows selected/fetched. It cannot be used to determine which row contains a NULL value.Compatibility between 32 bit and 64 bit implementations-------------------------------------------------------On platforms which support both 32 bit and 64 bit implementations, you must re-precompile your applications which include sqlca via an EXEC SQLINCLUDE statement before linking with the 64 bit binaries. For applicationswhich include sqlca.h via the #include preprocessor statement, you mustrecompile to include the 64 bit sqlca.h before relinking with the 64 bitbinaries.In the future, to support generated code compatibility across implementations,only one version, the 64 bit version, of sqlca.h may be supplied on ports which support both 32 bit and 64 bit binaries.SECTION 2: NEW FUNCTIONALITY----------------------------------------------------------1. New Non-Object Functionality Introduced between Releases 8.0.3 and 8.0.5. a. Expiring Passwords Pro*C/C++ now provides the ability for an application to change the password of a user at runtime via syntactic extensions to the Embedded SQL Connect Statement. b. Arrays of Structs Arrays of Structs and Pointers to Arrays of Structs are now supported as host variables and indicator variables in Embedded SQL. c. Large Object (LOB) and BFILE Support BLOBs, CLOBs, NCLOBs and BFILEs can be manipulated by declaring host variables to be of a specific LOB Locator type. These host variables can then be used in Embedded SQL to refer to LOBs in the server. d. Support for NCHAR data NCHAR data is now fully supported by the kernel. Previous releases of the precompiler supported this datatype with the NLS_LOCAL option. For new applications, users are strongly encouraged to rely on the database support and accordingly set NLS_LOCAL=NO during precompilation. e. User Callable SQLLIB Functions The existing user-callable sqllib functions have been given longer, more descriptive names. For compatibility reasons, the old names are still accepted. Users are strongly encouraged to use the new names in all new applications. f. User Settable Runtime Context Options The runtime context has options which are set to default values when it is created and allocated, A generic mechanism for setting specific runtime context values has been introduced. Only a couple of options are currently supported, however. g. Support for SYSDBA and SYSOPER Connect Modes In previous versions of Oracle, the user could connect with SYSDBA privileges by specifying: EXEC SQL CONNECT :<uid> IDENTIFIED BY :<pwd> ; where <uid> is a host variable containing "SYS" and <pwd> is a host variable containing "CHANGE_ON_INSTALL". The SYSDBA privileges are no longer available by default by using the above, thus Pro*C/C++ now supports an optional IN MODE clause in the embedded CONNECT statement where the user can specify either SYSDBA or SYSOPER mode. h. New WHENEVER action 'DO CONTINUE' The 'DO CONTINUE' action behaves much like a 'DO BREAK'. In the latter case, an explicit 'break' statement is issued. The 'DO CONTINUE' action causes a 'continue' statement to be generated. This differs from the 'CONTINUE' action which just results in the continuation of the program.2. New Non-Object Functionality for Release 8.1.3. a. Embedded SQL LOB Interface A convenient, easy to use Embedded SQL LOB Interface has been provided to give application developers enhanced support for LOBs that is meant to provide the same functional support for LOBs as the Oracle OCI API or PL/SQL DBMS_LOB package. b. ANSI Dynamic SQL Interface Pro*C/C++ now has a new implementation of Dynamic SQL that has been derived from the ANSI Standard. The ANSI Dynamic SQL Interface has enhancements over the Oracle Dynamic SQL Method 4 Interface. The ANSI Dynamic SQL Interface supports all Oracle types including Objects, Arrays of Structs, Cursor Variables and LOBs. c. DML Returning Clause Pro*C/C++ now supports the use of the DML Returning Clause on the INSERT, UPDATE and DELETE Embedded SQL DML statements. d. Support for Universal ROWID Pro*C/C++ now provides a mechanism to ALLOCATE and FREE Rowid Descriptors that are compatible with both Physical Rowids (associated with heap tables) and Logical Rowids (associated with index organized tables). Users declare Rowid Descriptors as OCIRowid *. These Descriptors may then be used as host variables in Embedded SQL statements. Oracle recommends use of rowid descriptors in all new developmeent. e. Extended Support for Runtime Contexts Extensions to the Embedded CONTEXT USE statement now allow for a developer to specify a specific runtime context or to default to a global SQLLIB runtime context instead. f. External Procedure Support External Procedures written in Pro*C/C++ are now callable from PL/SQL. A REGISTER CONNECT Embedded SQL statement has been introduced. This new statement is used instead of a CONNECT statement in the External Procedure to define the current unnamed connection for the Global SQLLIB Runtime Context. g. Support for Pre-Fetching Oracle supports the notion of Pre-Fetching a number of rows when a query is executed. This increases performance by eliminating the need for a server roundtrip when the rows are subsequently fetched. Pre-Fetching may be enabled in Pro*C/C++ by using the new command line option, PREFETCH = 0 .. 65535. The PREFETCH value indicates the number of rows that are pre-fetched when the query is executed (where 0 means prefetching is disabled). The option may be used in a configuration file, on the command line or inline.3. New Non-Object Functionality for Release 8.1.4. a. Calling Stored Java Procedures A new Embedded SQL CALL statement has been introduced in Release 8.1.4 of Pro*C/C++ to provide application developers the ability to invoke stored Java (and PL/SQL) procedures directly without having to use an Embedded PL/SQL anonymous block.4. New Non-Object Functionality for Release 8.1.5. a. Precompiled Header Capabilities Starting with release 8.1.5, Pro*C/C++ allows the user to precompile a header file and store the contents of that precompilation into a special binary file that can be instantiated in place of actually precompiling the header file when included via the #include directive during the precompilation of an ordinary Pro*C/C++ program or another header file. A new command line option (called 'header') is provided to both enable the new precompiled header mechanism and specify the file extension to use when generating and searching for the binary files.5. New Non-Object Functionality for Release 8.1.6 a. Fully Integrated Debugging Capabilities Beginning with release 8.1.6, the behavior of the LINES={YES|NO} option has changed. Now, when LINES=YES is specified, a #line preprocessor directive is generated after every line of generated code in the output program. This enables developers using debuggers such as GDB or IDEs such as the Microsoft Visual Studio for C++ to debug their application programs by viewing the Pro*C/C++ source program instead of by stepping through the generated code. 6. New Non-Object Functionality for Release 9i a. UNICODE Support Unicode variables (UTF16) were introduced in Pro*C/C++ 8i for the applications that use UCS2/UTF16 encoding. However, variables could only be bound to database CHAR type and the bind/define buffer would be implicitly converted to the server side database character set.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -