Getting database information from a datasource [message #44677] |
Thu, 09 June 2005 12:45  |
Eclipse User |
|
|
|
Originally posted by: shiffer_david.caramail.com
Is it possible getting database's information from a datasource object
with the API?
I've found how to get the name of the datasource object, using
DataSourceHandle object or OdaDataSourceHandle, but nothing about the URL
and the username.
Does any body know how to do?
|
|
|
|
Re: Getting database information from a datasource [message #45855 is a reply to message #44891] |
Tue, 14 June 2005 15:04  |
Eclipse User |
|
|
|
The best way to achieve this is to edit the beforeOpen script of the data
source object to set the runtime information of the data source. To do this,
right click on your JDBC data source and select "Edit Code". In the method
dropdown list, select "beforeOpen". In the code editor, write a script like
this:
extensionProperties.odaUser = "sesame";
extensionProperties.odaPassword = "open";
extensionProperties.odaURL = "jdbc:my_data_source:....";
extensionProperties.odaDriverClass = "com.mycompany.jdbc.Driver";
Refer to the BIRT ROM scripting spec for more information about scripting in
general. The names of the properties that you can set (odaUser, odaPassword,
etc.) are defined by the ODA extension. The BIRT-shipped ODA-JDBC driver
extension recognizes the above 4 properties.
-
Gary Xue
Birt Committer
"Artur" <artekzx@o2.pl> wrote in message
news:d8bo4v$ik3$1@news.eclipse.org...
> ...and is it possible to set jdbc connection at runtime (with api), or at
> least set connect string, user and password at runtime ???
>
> thanks
>
> "shiffer david" <shiffer_david@caramail.com> wrote in message
> news:69a9bc9f09666ce7aea2b0c0350a6628$1@www.eclipse.org...
> > Is it possible getting database's information from a datasource object
> > with the API?
> > I've found how to get the name of the datasource object, using
> > DataSourceHandle object or OdaDataSourceHandle, but nothing about the
URL
> > and the username.
> > Does any body know how to do?
> >
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.05261 seconds