Set Database Connection durning runtime

Unfortunately, you can’t change the project’s default database right now. You do have to go down the route of changing the database connection dynamically on all SQL queries. In the SQL query bindings you can link the datasource to the client tag. In scripting when you call system.db.runPrepUpdate or any of those functions you can specify the datasource connection:system.db.runPrepUpdate("INSERT INTO table (col1, col2) VALUES (?,?)", [val1, val2], "DatasourceConnection")Of course it could come from a tag:system.db.runPrepUpdate("INSERT INTO table (col1, col2) VALUES (?,?)", [val1, val2], system.tag.read("[Client]Datasource").value)