LibreOffice: XCommandPreparation Interface Reference

LibreOffice LibreOffice 5.3 SDK API Reference

Public Member Functions | List of all members
XCommandPreparation Interface Referencepublished

is used for preparation of commands. More...

`import"XCommandPreparation.idl";`

Inheritance diagram for XCommandPreparation:

## Public Member Functions
com::sun::star::sdbc::XPreparedStatement | prepareCommand ([in]string command, [in] long commandType) raises (com::sun::star::sdbc::SQLException)
| creates a com::sun::star::sdbc::PreparedStatement object for sending parameterized SQL statements to the database. More...
Public Member Functions inherited from XInterface
any | queryInterface ([in] type aType)
| queries for a new interface to an existing UNO object. More...
void | acquire ()
| increases the reference counter by one. More...
void | release ()
| decreases the reference counter by one. More...

## Detailed Description

is used for preparation of commands.

A command could be a table, query, or any kind of SQL statement prepared by the user.

Developers Guide
  Database - PreparedStatement From DataSource Queries

## Member Function Documentation

## ◆ prepareCommand()

com::sun::star::sdbc::XPreparedStatement prepareCommand | ( | [in] string | command,
|  | [in] long | commandType
| ) |  |
raises | ( | com::sun::star::sdbc::SQLException
| ) |  |

creates a com::sun::star::sdbc::PreparedStatement object for sending parameterized SQL statements to the database.

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

Parameters

  command | the command to be prepared. Any SQL statement.
  commandType | kind of the command com::sun::star::sdb::CommandType

Returns
  the PreparedStatement object

Exceptions

  com::sun::star::sdbc::SQLException | if a database access error occurs.

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

- com/sun/star/sdb/XCommandPreparation.idl