I call sc_change_connection(old, new) in a login control app, then do an sc_redir() to a menu. The “old” connection is valid. The “new” connection is valid.
The apps are designed around a schema, and the basic schema is set in the SQL of every app: there’s no way to set this dynamically.
The idea is to force a different database, with the same schema, for different users. (Think 100,000 users, millions of records, the user owns their database) “USE DatabaseName” would be pretty easy, if NetMake wasn’t trying to make this work with Microsoft’s abandoned Access product.
Anyway, sc_change_connection() provides no return code feedback. It’s a passive-aggressive macro.
All of the apps use whatever connection is defined under SQL for that app. It’s like sc_change_connection() does nothing.
How can I make an app use a different connection?