LibreOffice
LibreOffice 7.4 SDK API Reference
Public Member Functions | List of all members
XDataSource Interface Referencepublished

is used for establishing connections via a factory which is identified by its name. More...

import"XDataSource.idl";

Inheritance diagram for XDataSource:
XInterface DatabaseAccessDataSource DataSource XDatabaseAccess DocumentDataSource DatabaseAccess

Public Member Functions

XConnection getConnection ([in]string user, [in]string password) raises (SQLException)
 attempts to establish a database connection. More...
 
void setLoginTimeout ([in]long seconds) raises (SQLException)
 sets the maximum time in seconds that this data source will wait while attempting to connect to a database. More...
 
long getLoginTimeout () raises (SQLException)
 gets the maximum time in seconds that this data source can wait while attempting to connect to a 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 establishing connections via a factory which is identified by its name.

A DataSource object is typically registered by a naming service provider.

Developers Guide
Database Access - Connecting Through a DataSource

Member Function Documentation

◆ getConnection()

XConnection getConnection ( [in] string  user,
[in] string  password 
)
raises (SQLException
)

attempts to establish a database connection.

Parameters
userthe user name
passwordthe password
Returns
the connection object
Exceptions
SQLExceptionif a database access error occurs.

◆ getLoginTimeout()

long getLoginTimeout ( )
raises (SQLException
)

gets the maximum time in seconds that this data source can wait while attempting to connect to a database.

A value of zero means that the timeout is the default system timeout if there is one; otherwise, it means that there is no timeout. When a DataSource object is created the login timeout is initially zero.

Returns
the login time limit in seconds
Exceptions
SQLExceptionif a database access error occurs.

◆ setLoginTimeout()

void setLoginTimeout ( [in] long  seconds)
raises (SQLException
)

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

A value of zero specifies that the timeout is the default system timeout if there is one; otherwise, it specifies that there is no timeout. When a DataSource object is created the login timeout is initially zero.

Parameters
secondsthe login time limit in seconds
Exceptions
SQLExceptionif a database access error occurs.

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