|
|
|
Re: How to change the name of the database for a datasource dynamically? [message #757819 is a reply to message #757113] |
Wed, 16 November 2011 16:00 |
|
Mike
That will work but you need to set the odaURL.
So it would be something like:
var newurl = "jdbc:mysql://localhost/" + params["DBName"].value;
this.setExtensionProperty("odaURL",newurl);
Jason
On 11/16/2011 9:48 AM, Mike Wulkan wrote:
> Hi,
>
> I have one JDBC Data Source that all my Data Sets use. I would like to
> be able to change the name of the database defined in the Data Source in
> the "beforeOpen" exit for the Data Source so that we can use different
> databases for development .vs. deployment.
> I'm thinking that the name of the database would be passed as a report
> parameter.
>
> So I think the code would be something like:
>
> this.setExtensionProperty("???",params["DBName"].value);
>
> 1) Would this work?
> 2) What is the extension property name that I'd need to fill in for "???"?
>
> Thanks,
> Mike
|
|
|
|
Re: How to change the name of the database for a datasource dynamically? [message #775294 is a reply to message #775244] |
Thu, 05 January 2012 18:26 |
|
this.setExtensionProperty("odaPassword","yourpassword"); does not need
to be encrypted.
Jason
On 1/5/2012 11:22 AM, Mike Wulkan wrote:
> Thanks Jason for this information. One other (hopefully) minor thing.
>
> If I want to set the properties for the user and password as well, I see
> in the xml the property names to change are:
> odaURL
> odaUser
> odaPassword
>
> however for the odaPassword the value is an encrypted property.
>
> eg.
> <encrypted-property name="odaPassword"
> encryptionID="base64">cGFzczRub3c=</encrypted-property>
>
> 1) is the setExtensionProperty still the correct api to use to set the
> odaPassword?
> 2) how would one generate the correct encrypted string?
>
> I'm thinking I could use the GUI to create the data source and then copy
> the encrypted string but is there a better way?
|
|
|
Powered by
FUDForum. Page generated in 0.03375 seconds