interface XMultipleResults in module com::sun::star::sdbc::

(Global Index)

Syntax

interface XMultipleResults : com::sun::star::uno::XInterface ;

Description

is used for inspecting multiple results produced by the execution of a SQL statement.

Under some (uncommon) situations a single SQL statement may return multiple result sets and/or update counts. Normally you can ignore this unless you are (1) executing a stored procedure that you know may return multiple results or (2) you are dynamically executing an unknown SQL string. The methods XMultipleResults::getMoreResults() , XMultipleResults::getResultSet() and XMultipleResults::getUpdateCount() let you navigate through multiple results.

See also

XStatement

See also

XPreparedStatement

Method Summary

getResultSet returns the current result as a ResultSet object. This method should be called only once per result.

getUpdateCount returns the current result as an update count.

getMoreResults moves to a Statement's next result. It returns true if this result is a ResultSet. This method also implicitly closes any current ResultSet obtained with getResultSet.

Known Services Which Export this Interface

com::sun::star::sdbc::PreparedStatement

com::sun::star::sdbc::Statement

Method Details



getResultSet

Syntax

com::sun::star::sdbc::XResultSet getResultSet ();
raises ( com::sun::star::sdbc::SQLException );

Description

returns the current result as a ResultSet object. This method should be called only once per result.

Returns

the ResultSet object

Throws

SQLException if a database access error occurs.

getUpdateCount

Syntax

long getUpdateCount ();
raises ( com::sun::star::sdbc::SQLException );

Description

returns the current result as an update count.

If the result is a ResultSet or there are no more results, -1 is returned. This method should be called only once per result.

Returns

the current result as an update count.

Throws

SQLException if a database access error occurs.

getMoreResults

Syntax

boolean getMoreResults ();
raises ( com::sun::star::sdbc::SQLException );

Description

moves to a Statement's next result. It returns true if this result is a ResultSet. This method also implicitly closes any current ResultSet obtained with getResultSet.

There are no more results when (!getMoreResults() && getUpdateCount() == -1) .

Returns

true if there exists more ResultSet objects

Throws

SQLException if a database access error occurs.
Top of Page