interface XDatabaseAccess in module com::sun::star::sdb::

(Global Index)

Syntax

interface XDatabaseAccess : com::sun::star::sdbc::XDataSource ;

Description

is used to connect to a data access bean. A data access bean represents a database connection and provides additional information related to the connection such as forms, reports, or queries.

Method Summary

hasConnections indicates that connections already exist.

getIsolatedConnection attempts to establish a database connection, that can not be shared with other components. This should be used for transaction processing.

suspendConnections closes the all connections to database. This request could be aborted by listeners of the component.

addDatabaseAccessListener adds the specified listener to receive the events "connectionChanged", "approveConnectionClose", and "connectionClosing".

removeDatabaseAccessListener removes the specified listener.

Known Services Which Export this Interface

com::sun::star::sdb::DatabaseAccess

Method Details



hasConnections

Syntax

boolean hasConnections ();

Description

indicates that connections already exist.

Returns

true if so

getIsolatedConnection

Syntax

com::sun::star::sdb::XConnection getIsolatedConnection (
string user,
string password )
raises ( com::sun::star::sdbc::SQLException );

Description

attempts to establish a database connection, that can not be shared with other components. This should be used for transaction processing.

Parameter user

the user name

Parameter password

the password

Returns

an isolated connection object

Throws

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

See also

XConnection

suspendConnections

Syntax

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

Description

closes the all connections to database. This request could be aborted by listeners of the component.

Throws

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

addDatabaseAccessListener

Syntax

oneway void addDatabaseAccessListener (
com::sun::star::sdb::XDatabaseAccessListener listener );

Description

adds the specified listener to receive the events "connectionChanged", "approveConnectionClose", and "connectionClosing".

Parameter listener

the listener to append

See also

XDatabaseAccessListener

removeDatabaseAccessListener

Syntax

oneway void removeDatabaseAccessListener (
com::sun::star::sdb::XDatabaseAccessListener listener );

Description

removes the specified listener.

Parameter listener

the listener to append

See also

XDatabaseAccessListener
Top of Page