Skip to main content



      Home
Home » Archived » BIRT » Is it possible to set a jdbc driver at runtime?
Is it possible to set a jdbc driver at runtime? [message #63755] Tue, 02 August 2005 17:51 Go to next message
Eclipse UserFriend
1. Can the statically (design-time) configured driver have its init
parameters configured at runtime? (ie. set the connection URL, user id,
password, etc. at runtime)

2. Can the driver class itself also be dynamically configured at runtime?

Thanks.

Marko.
..
Re: Is it possible to set a jdbc driver at runtime? [message #64195 is a reply to message #63755] Wed, 03 August 2005 16:19 Go to previous message
Eclipse UserFriend
The answer to both questions is yes. You can use scripting to dynamically
change data source connection properties at runtime. I am copying this
how-to from a previous post by me. Hope this help.
Gary

===
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.
===

"Marko" <mmilicevic@pssd.com> wrote in message
news:dcopq4$s3a$1@news.eclipse.org...
> 1. Can the statically (design-time) configured driver have its init
> parameters configured at runtime? (ie. set the connection URL, user id,
> password, etc. at runtime)
>
> 2. Can the driver class itself also be dynamically configured at runtime?
>
> Thanks.
>
> Marko.
> .
>
>
>
Previous Topic:Get resultset from dataset
Next Topic:How do I manipulate two metrics from two data sources in a report ?
Goto Forum:
  


Current Time: Thu Mar 13 16:04:00 EDT 2025

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

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

Back to the top