5.2.2hdfql_execute_get_status
Syntax
int hdfql_execute_get_status(void)
Description
Get the status of the last executed operation. In other words, this function returns the status of the last call to hdfql_execute.
Parameter(s)
None
Return
int – depending on the success of the last executed operation, it can be HDFQL_SUCCESS, HDFQL_ERROR_PARSE, HDFQL_ERROR_NOT_SPECIFIED, HDFQL_ERROR_NOT_FOUND, HDFQL_ERROR_NO_ACCESS, HDFQL_ERROR_NOT_OPEN, HDFQL_ERROR_TEMPORARILY_UNAVAILABLE, HDFQL_ERROR_INVALID_NAME, HDFQL_ERROR_INVALID_FILE, HDFQL_ERROR_NOT_SUPPORTED, HDFQL_ERROR_NOT_ENOUGH_SPACE, HDFQL_ERROR_NOT_ENOUGH_MEMORY, HDFQL_ERROR_ALREADY_EXISTS, HDFQL_ERROR_EMPTY, HDFQL_ERROR_FULL, HDFQL_ERROR_BEFORE_FIRST, HDFQL_ERROR_AFTER_LAST, HDFQL_ERROR_OUTSIDE_LIMIT, HDFQL_ERROR_NO_ADDRESS, HDFQL_ERROR_UNEXPECTED_TYPE, HDFQL_ERROR_UNEXPECTED_DATA_TYPE, HDFQL_ERROR_UNEXPECTED_STORAGE_TYPE, HDFQL_ERROR_DANGLING_LINK, HDFQL_ERROR_NOT_REGISTERED, HDFQL_ERROR_INVALID_OPERATION, HDFQL_ERROR_INVALID_REGULAR_EXPRESSION, HDFQL_ERROR_INVALID_SELECTION, or HDFQL_ERROR_UNKNOWN.
Example(s)
// declare variable
int status;
// execute script (composed of only one operation (i.e. SHOW USE DIRECTORY))
hdfql_execute("SHOW USE DIRECTORY");
// get status of last executed script (i.e. SHOW USE DIRECTORY)
status = hdfql_execute_get_status();
// display message about the status of last executed script (i.e. successful or not)
if (status == HDFQL_SUCCESS)
printf("Execution was successful\n");
else
printf("Execution was not successful and returned status is %d\n", status);