LibreOffice: XPreparedStatement Interface Reference

LibreOffice LibreOffice 7.4 SDK API Reference

Loading...
Searching...
No Matches
Public Member Functions | List of all members
XPreparedStatement Interface Referencepublished

provides the possibility of executing a precompiled SQL statement. More...

Inheritance diagram for XPreparedStatement:

## Public Member Functions
XResultSet | executeQuery () raises (SQLException)
| executes the SQL query in this `PreparedStatement` object and returns the result set generated by the query.
long | executeUpdate () raises (SQLException)
| executes the SQL INSERT, UPDATE or DELETE statement in this com::sun::star::sdbc::PreparedStatement object.
boolean | execute () raises (SQLException)
| executes any kind of SQL statement.
XConnection | getConnection () raises (SQLException)
| returns the com::sun::star::sdbc::Connection object that produced this com::sun::star::sdbc::Statement object.
Public Member Functions inherited from XInterface
any | queryInterface ([in] type aType)
| queries for a new interface to an existing UNO object.
void | acquire ()
| increases the reference counter by one.
void | release ()
| decreases the reference counter by one.

## Detailed Description

provides the possibility of executing a precompiled SQL statement.

A SQL statement is pre-compiled and stored in a PreparedStatement object. This object can then be used to efficiently execute this statement multiple times.

## Member Function Documentation

## ◆ execute()

boolean execute | ( |  | ) |
raises | ( | SQLException
| ) |  |

executes any kind of SQL statement.

Some prepared statements return multiple results; the execute method handles these complex statements as well as the simpler form of statements handled by executeQuery and executeUpdate.

Returns
  `TRUE` if successful

Exceptions

  SQLException | if a database access error occurs.

## ◆ executeQuery()

XResultSet executeQuery | ( |  | ) |
raises | ( | SQLException
| ) |  |

executes the SQL query in this `PreparedStatement` object and returns the result set generated by the query.

Returns
  the ResultSet object

Exceptions

  SQLException | if a database access error occurs.

## ◆ executeUpdate()

long executeUpdate | ( |  | ) |
raises | ( | SQLException
| ) |  |

executes the SQL INSERT, UPDATE or DELETE statement in this com::sun::star::sdbc::PreparedStatement object.

In addition, SQL statements that return nothing, such as SQL DDL statements, can be executed.

Returns
  either the row count for INSERT, UPDATE or DELETE statements; or 0 for SQL statements that return nothing

Exceptions

  SQLException | if a database access error occurs.

## ◆ getConnection()

XConnection getConnection | ( |  | ) |
raises | ( | SQLException
| ) |  |

returns the com::sun::star::sdbc::Connection object that produced this com::sun::star::sdbc::Statement object.

Returns
  the Connection object

Exceptions

  SQLException | if a database access error occurs.

The documentation for this interface was generated from the following file:

- com/sun/star/sdbc/XPreparedStatement.idl