I have been using sc_connection_edit very successfully to change database at login time, once changed it is noticed by all other applications, and works perfectly.
However, when using sc_connection_edit in a grid’s onRecord event, the connection does not change.
I believe that the connection is only being opened at application init time.
When the sc_connection_edit macro is executed, it should set a flag in the appropriate database object so that the next database access forces a reconnect.
To reproduce:
Import project from http://www.lahar.net/bug_demo/sc8_201411211204_bkp_Test.zip
Create the database using SQL: http://www.lahar.net/bug_demo/bug_demo_database.sql
Dave