interface XDataSource in module com::sun::star::sdbc::

(Global Index)

Syntax

interface XDataSource : com::sun::star::uno::XInterface ;

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.

Method Summary

getConnection attempts to establish a database connection.

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

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

Known Services Which Export this Interface

com::sun::star::sdb::DatabaseAccessDataSource

Method Details



getConnection

Syntax

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

Description

attempts to establish a database connection.

Parameter user

the user name

Parameter password

the password

Returns

the connection object

Throws

SQLException if a database access error occurs.

setLoginTimeout

Syntax

void setLoginTimeout (
long seconds )
raises ( com::sun::star::sdbc::SQLException );

Description

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.

Parameter seconds

the login time limit in seconds

Throws

SQLException if a database access error occurs.

getLoginTimeout

Syntax

long getLoginTimeout ();
raises ( com::sun::star::sdbc::SQLException );

Description

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

Throws

SQLException if a database access error occurs.
Top of Page