Hi
I have set up a multi tenant solution.
User initially logs in via a table in database A, The application login once successful switches to the tenants database using switchServer. This works ok for all tenants on first login.
If however I go back to the login form and select a new tenant, then switch server changes the login users table ok, but keeps all the other tables of the previous login.
In developer I have no problems, but on live Application Server the login table of users changes, but all other relations etc are still the last database.
The documentation states the following:
My databases are identical so think I have that right
Not sure about the comment about Repository_Server. My server does use repository server I think as there is a repository server database. Wonder if this is my problem?
Urgent help needed
Using 7.2.0 on WIndows Professional Java 1.7.0_21
Thanks
switchServer(sourceName, destinationName): Boolean
Switches a named server to another named server with the same datamodel (recommended to be used in an onOpen method for a solution). return true if successful. Note that this only works if source and destination server are of the same database type.
//dynamically changes a server for the entire solution, destination database server must contain the same tables/columns!
//will fail if there is a lock, transaction , if repository_server is used or if destination server is invalid
//in the solution keep using the sourceName every where to reference the server!
var success = databaseManager.switchServer(‘crm’, ‘crm1’)
@param {String} sourceName The name of the source database server connection
@param {String} destinationName The name of the destination database server connection.
@return Boolean true if the switch could be done.