Please enable JavaScript to view this site.

ESL Documentation

Level 2 subroutine

Determine whether there are more result sets.

call EDSMoreResults(HSTMT_IV ) 

HSTMT_IV An input integer value that indicates the statement handle.

Description

If more results are available, EDSMoreResults returns EDS_SUCCESS. If all results are processed, EDSMoreResults returns EDS_NO_DATA_FOUND. If the result of the next statement in a batch failed or an error occurred in the function, EDSMoreResults returns EDS_ERROR. If EDSMoreResults is called when there are unfetched rows or when EDSMoreResults returns EDS_NO_DATA_FOUND, it has the same effect as EDSFreeStmt with the EDS_CLOSE option for the current results set.

Return Values

EDSMoreResults returns EDS_SUCCESS, EDS_INVALID_HANDLE, EDS_ERROR, or EDS_NO_DATA_FOUND.

When EDSMoreResults returns EDS_ERROR, you can obtain an associated SQLSTATE value with more specific information by calling EDSError. The following table lists each typical SQLSTATE value and explains each one in the context of the command EDSMoreResults.

The following table lists possible SQLSTATE values:

SQL

STATE

Error

Description

IM001

Driver does not support this function

The driver associated with the statement handle does not support the function.

S1000

General error

An error occurred for which there was no specific SQLSTATE and for which no implementation-specific SQLSTATE was defined. The error message returned by EDSError in the argument ERRORTEXT describes the error and its cause.

S1001

Memory allocation failure

The driver was unable to allocate the memory required to support execution or completion of the function.

S1008

Operation cancelled

Asynchronous processing was enabled for the statement handle. The function was called and before it completed execution, EDSCancel was called on the statement handle. Then the function was called again on the statement handle.

S1010

Function

An asynchronously executing function (not this sequence error one) was called for the statement handle and was still executing when this function was called.

S1T00

Timeout expired

The timeout period expired before the data source returned the result set. The timeout period is set through EDSSetStmtOption, EDS_QUERY_TIMEOUT.

See Also

EDSFetch fetches a result row.

EDSGetData fetches a column from a result row.