Sets the current database connection. Recommended for use when working with multiple database connections.
All consequent API calls made via DB API functions will be executed via this connection. When working with the default (primary) connection the call of this function is not required.
To switch back to primary connection call this function without arguments.
Syntax
DB_SetConnection(name)
Arguments
name
the connection name, as it appears in wizard.
Return value
No return value.
Example
'switch connection to Northwind
DB_SetConnection("Northwind")
'execute query
DB_Exec("UPDATE `orders` SET `Status`='shipped' WHERE OrderDate=CURDATE()")
'switch back to primary connection
DB_SetConnection("")
See also: