Change Database Connection Catalog
This example shows how to connect to a database and change the
database catalog. You can work with data in a different catalog within the same
database using the execute
function.
Create an ODBC database connection to a Microsoft® SQL Server® database with Windows® authentication. Specify a blank user name and password.
datasource = 'MS SQL Server Auth'; conn = database(datasource,'','');
Change the catalog for the database connection conn
to
intlprice
by creating and executing an SQL query.
sqlquery = 'Use intlprice';
execute(conn,sqlquery)
Close the database connection.
close(conn)