Well, this was supposed to be fixed in 8.00.0015 today, but no luck.
It no longer generates a function-not-found error, but it simply does not work the same in production as in developer mode.
If anybody at NetMake needs a sample app that demonstrates this, I have one and would be happy to forward it.
The symptoms are simple to reproduce.
- Create a database with one table, containing one column. Call this database “demo-1”.
- Create another database like demo-1 and call it demo-2. Use same username, password, table name, column name. Only the database name is different.
- Add easily recognizable data to the two tables so that you can tell the two databases apart by their contents.
- Create a grid using one of the databases, call it my_grid
- Create two blank apps, blank_a and blank b with the following contents:
blank_a:
sc_connection_edit(“conn_mysql”, array( ‘database’ => ‘demo-1’));
sc_redir(‘my_grid’);
blank_b:
sc_connection_edit(“conn_mysql”, array( ‘database’ => ‘demo-2’));
sc_redir(‘my_grid’);
- Create a menu app with two menu items, linking to the two blank apps.
When you run this in Developer Mode, it behaves exactly as I would expect, selecting a menu item changes the data that gets displayed.
When you run this from Production Mode, the data never changes. It acts like the grid is never re-opening the connection using the new connection info.
My belief is that in production mode, the grid uses the connection data that it already has in place, instead of init() noticing that the connection data has changed.
By the way, your own sample from the link at the beginning of this thread is doing exactly the same thing. THe charts for the two companies are THE SAME, not coming from different databases at all.
Dave