Prior to r11, the SQLCODE was the sole indicator to users of the success or failure of an SQL transaction. Beginning with r11, in addition to the SQLCODE a SQLSTATE status indicator is provided that corresponds to any error or completion condition.
No special configuration is needed to use the SQLSTATE status indicators. Applications can use the SQLSTATE simply by referencing the new SQLSTATE field.
When a procedure is created using PARAMETER STYLE SQL in the CREATE PROCEDURE statement, the SQLSTATE is returned in the SQLCA.
The SQLSTATE feature is backward-compatible with existing applications. Because the fields holding the SQLSTATE in the SQLCA were reserved fields in prior versions. However, any existing, embedded SQL program that has defined a field named SQLSTATE fails any new preprocessing because of the duplicate name.
|
Copyright © 2014 CA.
All rights reserved.
|
|