Uwe,
In your particular case, that is an adequate workaround, but actually the effects of the bug go much deeper than this.
I also have many databases, all structured alike, and the information for the customer’s database is set at login time.
Now, think about the case where I (as administrator of many accounts) want to display a grid that lists each account, database connection parameters, and the total number of records in a particular table of each account (In my case, Employees).
Because the connections are only established during the Application Init phase, any of the connection modifying macros in the grid’s onRecord (even for databases that are not the Primary Database/Connection for the Application) are ignored until the next Application Init. To see this in action, look at the sample app I created for this post .
The fix for the flaw in the scriptcase logic is as follows:
When you modify a connection using any of the connection modification macros, the underlying logic should be setting a flag so that the very next read/write using the affected connection forces a re-connect using the new connector information.
I proved this in the workaround that I supplied in that project. It should be only take a few minutes for NetMake to correct the macros involved, if only someone would give a copy of it to the developer responsible for the connection macros. So far, after more than a month, I cannot get anyone at Scriptcase to listen.
Netmake, please. I know that I may not have expressed myself clearly in these posts, that is why I created the demo project to show exactly what is happening and how to fix it. Even if you do not understand what I am saying, please give the demo project to the developer responsible for the sc_connection_edit macro and he will understand what I am trying to demonstrate. Links for project & database setup are here.
Dave