Page 1 of 1
Dynamic connection with database
Posted: Tue Apr 12, 2011 7:13 am
by thiagorente
Hello,
I wanna know if I can use a parameter in the connection with the database, because my system create other databases and I have to change this in connection.
Dynamic connection with database
Posted: Wed Apr 13, 2011 1:46 am
by Vladimir
Hello,
Please tell us what parameters do you want to change? The Request User Name and Password option exists to manage the username and password. Also you can completely change the connection string in a 'sti_get_connection_string' function, which is placed in the 'index.php' script file.
Thank you.
Dynamic connection with database
Posted: Wed Apr 13, 2011 8:58 am
by thiagorente
Hi Vladimir,
I'm not using this connection, I'm setting a connection in the API, the Designer.html. I don't know how to enter on a report with index.php.
I wanna change the database where my reports will access. There's no way in the API to put a variable in the connection, just like parameters in querys?
Dynamic connection with database
Posted: Wed Apr 13, 2011 9:13 am
by Vladimir
Hello,
Unfortunately, at this moment you cannot use parameters and variables in the connection string.
Thank you.
Re: Dynamic connection with database
Posted: Tue Jul 17, 2012 2:55 pm
by Demo_S
please can you specify, how do you set connection in api? i do need exactly this to implement
Re: Dynamic connection with database
Posted: Wed Jul 18, 2012 10:33 am
by HighAley
Hello.
Demo_S wrote:please can you specify, how do you set connection in api? i do need exactly this to implement
You could completely change the connection string in a 'sti_get_connection_string' function, which is placed in the 'index.php' script file.
Thank you.
Re: Dynamic connection with database
Posted: Wed Jul 18, 2012 12:11 pm
by Demo_S
but if i have no connections at all, then sti_get_connection_string will not be called.
i do need to add some values to dictionary.connections beforehand
Re: Dynamic connection with database
Posted: Thu Jul 19, 2012 9:52 am
by HighAley
Hello.
Demo_S wrote:but if i have no connections at all, then sti_get_connection_string will not be called.
i do need to add some values to dictionary.connections beforehand
Unfortunately, it's impossible now.
This task is in our to-do list. We are planning to add this feature in our next release in September.
Thank you.