TurboIMAGE/XL Database Management System Reference Manual MPE/iX V6.5 (30391-90011)
296 Chapter6
Host Language Access
Pascal
Status : Database_Status_Type;
Option : ShortInt;
Mode : ShortInt;
List : Data_Item_List_Type;
(* Define all TurboIMAGE/XL procedure calls that *)
(* will be used in your application program. *)
Procedure DBBEGIN ; Intrinsic;
Procedure DBEND ; Intrinsic;
Procedure DBOPEN ; Intrinsic;
Procedure DBCLOSE ; Intrinsic;
Procedure DBGET ; Intrinsic;
Procedure DBPUT ; Intrinsic;
Procedure DBFIND ; Intrinsic;
Procedure DBEXPLAIN ; Intrinsic;
Procedure DBERROR ; Intrinsic;
Procedure DBDELETE ; Intrinsic;
Procedure DBUPDATE ; Intrinsic;
Procedure DBLOCK ; Intrinsic;
Procedure DBUNLOCK ; Intrinsic;
Procedure DBINFO ; Intrinsic;
Obtaining Error Messages and Explanations
The following procedure implements the Get_Error_And_Explain routine of the sample
program. In this procedure, DBEXPLAIN and DBERROR are called using Pascal. DBEXPLAIN
interprets the contents of the Status parameter and prints a message on $STDLIST.
DBERROR returns a message in Error_Buffer, explaining the condition code returned by
TurboIMAGE/XL. At the end of the procedure, users can choose to abort or continue the
execution of this program. Note that aborting a process from within a transaction would
result in an incomplete transaction. It is good programming practice to end your
transaction, release your locks, and close any open database(s) before aborting your
process.
$Page$
Procedure Get_Error_And_Explain;
(*
Access : Mode 1 - Shared Modified Access
The Orders database was opened in mode 1
Called by: Open_The_Database
Get_Sales_For_Date
Get_A_Customer_Record
Get_A_Product_Record
List_All_Customers
Add_A_Product
Update_A_Customer
Delete_A_Product
Rewind_Customer_Set
Get_Data_Item_Info
Close_The_Database
Calls : DBERROR
DBEXPLAIN
*)