IBM Books

Image, Audio, and Video Extenders Administration and Programming


Handling API return codes

Each DB2 extender API call returns a code. A return code of 0 indicates that the API call was processed successfully. A return code other than 0, indicates that the API call was processed successfully but encountered a warning condition, or could not be processed successfully because of an error condition.

Chapter 16, Application programming interfaces lists the symbolic value for and describes each code that can be returned by the DB2 extender APIs.

You can retrieve additional information about errors encountered by an API. Use the DBxGetError API to retrieve this additional information, where x is a for the Audio Extender, i for the Image Extender, and v for the Video Extender. The DBxGetError API returns the SQL error code and associated message for the last DB2 extender API that encountered an error. See DB2 Messages Reference for information about SQL error codes. See Messages for information about each message that can be returned by the DBxGetError API.

For example, the following statements in a C application program enable a table for the Audio Extender and then check for errors.

rc=DBaEnableTable((char *)NULL, "employee");
 
rc=DBaGetError(&errCode, &errMsg);


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]