LibreOffice: XDriverManager Interface Reference

LibreOffice LibreOffice 7.4 SDK API Reference

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

is the basic interface for managing a set of SDBC drivers. More...

Inheritance diagram for XDriverManager:

## Public Member Functions
XConnection | getConnection ([in]string url) raises (SQLException)
| attempts to establish a connection to the given database URL.
XConnection | getConnectionWithInfo ([in]string url, [in]sequence< com::sun::star::beans::PropertyValue > info) raises (SQLException)
| attempts to establish a connection to the given database URL.
void | setLoginTimeout ([in]long seconds)
| sets the maximum time in seconds that a driver will wait while attempting to connect to a database.
long | getLoginTimeout ()
| gets the maximum time in seconds that a driver can wait when attempting to login to a database.
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

is the basic interface for managing a set of SDBC drivers.

When the method com::sun::star::sdbc::XDriverManager::getConnection() is called, the DriverManager will attempt to locate a suitable driver.

See also
  com::sun::star::sdbc::XDriver
  com::sun::star::sdbc::XConnection

## Member Function Documentation

## ◆ getConnection()

XConnection getConnection | ( | [in] string | url | ) |
raises | ( | SQLException
| ) |  |

attempts to establish a connection to the given database URL.

The DriverManager attempts to select an appropriate driver from the set of registered JDBC/SDBC drivers.

Parameters

  url | a database url of the form sdbc:subprotocol:subname

Returns
  the Connection object

Exceptions

  SQLException | if a database access error occurs.

## ◆ getConnectionWithInfo()

XConnection getConnectionWithInfo | ( | [in] string | url,
|  | [in] sequence< com::sun::star::beans::PropertyValue > | info
| ) |  |
raises | ( | SQLException
| ) |  |

attempts to establish a connection to the given database URL.

The DriverManager attempts to select an appropriate driver from the set of registered JDBC/SDBC drivers.

Parameters

  url | a database url of the form sdbc:subprotocol:subname
  info | a list of arbitrary string tag/value pairs as connection arguments; normally at least a "user" and "password" property should be included

See also
  com::sun::star::sdbc::ConnectionProperties

Returns
  the Connection object

Exceptions

  SQLException | if a database access error occurs.

## ◆ getLoginTimeout()

long getLoginTimeout | ( |  | ) |

gets the maximum time in seconds that a driver can wait when attempting to login to a database.

Returns
  the driver login time limit in seconds

Exceptions

  SQLException | if a database access error occurs.

## ◆ setLoginTimeout()

void setLoginTimeout | ( | [in] long | seconds | ) |

sets the maximum time in seconds that a driver will wait while attempting to connect to a database.

Parameters

  seconds | the login time limit in seconds

Exceptions

  SQLException | if a database access error occurs.

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

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