Hi gsmchristian ,
You can change the database connection using scriptcase. Please follow these steps:
#1 Example to execute a SQL query using other connection (ONLY for this SQL query)
sc_lookup(rs, "select field from table", 'MyNewConnection');
#2 Example to change connection (Applies to all your SQL querys and All Applications)
sc_change_connection ( "MyOldConnection",'MyNewConnection');
So if you want to switch a connection depending of the user you can use this script:
if($user=='jonh'){
sc_change_connection ( "MyOldConnection",'MyNewConnection');
}
Note: When using sc_change_connection you need to reload the page or redir to another application to see the connection changes.
Note 2: Your connection NAME is the name that you define in ScriptCase Database>NewConnection