Hi
Our users have requested that some information from another system, on different SQL servers, be displayed within our WM forms. Based on the client, this could be on one of a number of SQL servers. We already maintain a cross-reference table, but is there a way within WM to dynamically select the connection to be used when the client selection changes.
thanks
Our users have requested that some information from another system, on different SQL servers, be displayed within our WM forms. Based on the client, this could be on one of a number of SQL servers. We already maintain a cross-reference table, but is there a way within WM to dynamically select the connection to be used when the client selection changes.
thanks
RE: Dynamic Database Connections
You can set up any number of database connections in WebMaker, but the connection details for each one do need to be known when the project is published.
If you have a manageable number of database connections then you could set these all up in your project, either directly in WebMaker, or by using different JNDI resources.
Although each SQL Statement action must use a specific connection, you could set up multiple rules in your controller, each one performing the appropriate query against a different database. By using rule conditions you could determine which one gets used based on the current client information passed in etc.
If this is not a possible solution for you then you may need to use some custom code unfortunately. In this case, one option would be to write a Java Method which would handle dynamically connecting to the appropriate database and performing the required query. This would obviously require more work to implement though.
If you need any more details on these options please let me know.
Regards,
Gerard