| United States-English |
|
|
|
![]() |
ALLBASE/SQL C Application Programming Guide: HP 3000 MPE/iX Computer SystemsChapter 4 Runtime Status Checking and the sqlca |
|
This chapter examines the need for runtime status checking. It describes the sqlca and the conditions under which its data items are set by ALLBASE/SQL. It also gives several examples of implicit and explicit status checking, some of which use SQLEXPLAIN to display a status message. Examples of handling specific status checking tasks are included under "Approaches to Status Checking." When an SQL command is executed, ALLBASE/SQL returns information describing how the command executed. This information signals one or more of the following status conditions:
Based on this runtime status information, a program can COMMIT WORK, ROLLBACK WORK, continue, terminate, display a message, or perform some other appropriate activity.
In conjunction with status checking of any kind, you can use the SQLEXPLAIN command. This command retrieves a message from the ALLBASE/SQL message catalog that describes an error or warning condition. When several errors or warnings occur, you can use SQLEXPLAIN to retrieve messages for all of them. Messages are available to your program in the order in which the errors or warnings occurred. When ALLBASE/SQL rolls back the current transaction, it does not continue to look for errors. This means that the last message retrieved will indicate the cause of the roll back. An example of this scenario is presented later in this chapter under "sqlcode." Refer to the ALLBASE/SQL Message Manual for an explanation of all error and warning messages. |
|||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||