We have a development-data database and a production-data database and it would sometimes be useful for developers to be able to dynamically switch which server a form is getting its data so we can view the data in the production environment. Currently, we have to rename the data database connection string to point it to the production database and restart Servoy.
So, we’d like a way to change the form property ‘server’ with a function – like a controller.setServerName().
Can anyone offer an alternative strategy for dealing with this problem?
Thanks!
Hi,
Learned this one from Bob Cusick… keep two copies of your servoy.properties file. One contains the connection info to your dev server, the other connection info to your production server. The active properties file will always be named servoy.properties. The other can be named something like my_other_servoy.properties.
I generally have multiple copies of servoy.properties on my computer… one for each customer project.
Quit Servoy and switch the names of the files. You still have to quit and restart servoy, but it really does not take much time. And you don’t have to muck around with changing database connections.
Cheers,
Rich Coulombre
If you’re not into renaming have a look at this servoy magazine article:
http://www.servoymagazine.com/home/2005 … run.html
It’s about mac os x but at the bottom there is comment on how to do it on windows