| Home | Libraries | People | FAQ | More

###### connection::read_resultset_head (1 of 2 overloads)

Reads metadata for subsequent resultsets in a multi-resultset operation.

###### Synopsis

    template<
        class ExecutionStateType>
    void
    read_resultset_head(
        ExecutionStateType& st,
        error_code& err,
        diagnostics& diag);

###### Description

If `st.should_read_head() == true`, this function will read the next resultset's initial response message and metadata, if any. If the resultset indicates a failure (e.g. the query associated to this resultset contained an error), this function will fail with that error.

If `st.should_read_head() == false`, this function is a no-op.

`st` may be either an `execution_state` or `static_execution_state` object.

This function is only relevant when using multi-function operations with statements that return more than one resultset.

When using the static interface, this function will detect schema mismatches for the resultset currently being read. Further errors may be detected by subsequent invocations of this function and by `read_some_rows`.