(incubating) | The Free and Open Productivity Suite

Developer's Guide

API

SDK

Tips 'n' Tricks

Miscellaneous

Content for OpenOffice.org version 3.3.

:: com :: sun :: star :: sdbc ::

interface XDataSource
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 - Connecting Through a DataSource

Methods' 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.  
Methods' Details
getConnection
XConnection
getConnection( [in] string  user,
[in] string  password )
raises( 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
void
setLoginTimeout( [in] long  seconds )
raises( 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
long
getLoginTimeout()
raises( 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

Apache OpenOffice is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Apache Incubator. Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and decision making process have stabilized in a manner consistent with other successful ASF projects. While incubation status is not necessarily a reflection of the completeness or stability of the code, it does indicate that the project has yet to be fully endorsed by the ASF.

Copyright & License
Apache and the Apache feather logos are trademarks of The Apache Software Foundation. OpenOffice.org and the seagull logo are registered trademarks of The Apache Software Foundation. Other names appearing on the site may be trademarks of their respective owners.