DB-Library’s dbresults can return SUCCEED, FAIL, or NO_MORE_RESULTS:
SUCCEED indicates that a command executed successfully and that there may be data for the application to retrieve.
FAIL usually indicates that the command failed on the server, but it can also indicate a network or internal DB-Library error. Further, when a command fails on the server, dbresults returns FAIL, but data from subsequent commands may still be available.
NO_MORE_RESULTS indicates that no more results are available for processing. A typical application calls dbresults in a loop until it returns NO_MORE_RESULTS. Within the loop, the application checks for dbresults return codes of SUCCEED or FAIL.
In Client-Library, a synchronous-mode ct_results call can return CS_SUCCEED, CS_FAIL, CS_CANCELED, or CS_END_RESULTS. (For an asynchronous call, the completion status will be one of these values.)
CS_SUCCEED indicates that the ct_results routine succeeded. It indicates nothing about the results of the command.
CS_FAIL indicates that the ct_results routine failed. It always indicates either a serious network or client-side error. No result data is available after ct_results returns CS_FAIL.
CS_END_RESULTS is identical in meaning to dbresults’ NO_MORE_RESULTS.
CS_CANCELED means that results were canceled with ct_cancel(CS_CANCEL_ATTN) or ct_cancel(CS_CANCEL_ALL).
ct_results indicates server-side error or success by means of its result_type output parameter:
A result type of CS_CMD_FAIL indicates that a command failed on the server. DB-Library indicates this by returning FAIL from dbsqlexec, dbsqlok, or dbresults (whichever is active when the server reports the error).
A result type of CS_CMD_SUCCEED indicates that a data-modification (create, update, insert, and so forth) or an exec command executed successfully. For example, after a successful delete language command, the application receives a result_type value of CS_CMD_SUCCEED.