Sc_change_connection ignored in control App

The command
sc_change_connection(“conn_mysql_c5_argos”,“conn_mysql_c5_pagesus”);

is totally ignored in ApplicationInit and OnScriptInit in a Control APP.
The main database is still the connection to conn_mysql_c5_argos.
Other Apps like Grid/Forms have no problems …

In my case I use the app_login … there I change connection → then I call → sc_redir (“app_retrieve_pswd”); the app “app_retrieve_pswd” still points to old Database and ignores the change_connection Command in the app_login before.

In both application the standard sql_connection is pointed to conn_mysql_c5_argos, but change_connection should take affect on next following control app.

Bad fault or I’m wrong ?

Best regards
Uwe Pfeiffer

I found my error :
in sc_change_connection ($old,[Database_connection_new])
is not working. This command cannot handle the globals of Scriptcase !!

After I changed it to
sc_change_connection ($old,$new) it works fine.
2 days of testing before solution …

Best regards
Uwe