Skip to main content



      Home
Home » Archived » BIRT » Getting database information from a datasource
Getting database information from a datasource [message #44677] Thu, 09 June 2005 12:45 Go to next message
Eclipse UserFriend
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 #44891 is a reply to message #44677] Fri, 10 June 2005 05:56 Go to previous messageGo to next message
Eclipse UserFriend
....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?
>
Re: Getting database information from a datasource [message #45855 is a reply to message #44891] Tue, 14 June 2005 15:04 Go to previous message
Eclipse UserFriend
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?
> >
>
>
Previous Topic:How do I limit the data set to a particular schema for Oracle JDBC connection?
Next Topic:count of connection objects and data set editor
Goto Forum:
  


Current Time: Thu Jul 03 05:38:02 EDT 2025

Powered by FUDForum. Page generated in 0.05261 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top