Changing Databases

I am in the active sports timing business, timing and producing race results for running races, triathlons, bike races, ski races, etc. I’ve developed lots of custom solutions using MySQL with VB6 and VB.NET front ends in the past and am very interested in putting something together using Servoy.

My current structure of managing the data from event to event is to create a new database for each event. This way the database size stays relatively small and is easier to query against.

I am wondering how I could take this same approach using Servoy and not have to spend a lot of time changing DB Server connections etc. Is it possible to programmatically change the DB Server Connection upon start up?

Currently within the apps Ive made upon program startup I see a list of all databases and then can chose which database I want to use or create a new database. Could an approach like this be done in Servoy?

Thanks!

Greg Blasko

Assuming your SCHEMA is the same in all the databases - then in 2.2.1 you can use a new databaseManager command to replace the connection for “swapping” the connection information from one named connection to another.

And this is what bob mentioned JUST before I wanted to :)

//dynamically change a server for the entire solution, destination database server must contain same tables/columns!
//will fail if there is a lock,transaction or if repository_server is used
var success = databaseManager.switchServer('crm', 'crm1')

Hope this helps

Hi Greg:

We are trying to decide which tool use to create the interface of our new database. The candidates are Servoy and VB.net. I have not programmed before with them so, I would like to know your opinion about them. What advantages and disadvantages you find in both? I want to set a standard for db development, so this decision will affect our future databases.

Thanks,

Mary