roboticus is correct as far as changing the database after you have connected. However another way is to use a DSN-less connection where you specify the database at connect time. For this you use a connect string like "DRIVER={SQL Server};Database=mydatabase;UID=username;PWD=password;" where "SQL Server" is the ODBC driver named shown in the ODBC Administrator drivers tab. This way you don't have to create a DSN beforehand and can connect to any database at connect time. If you search for SQL Server connection strings you'll find other attributes MS SQL Server can take.
In reply to Re: changing database with DBI and DBD-ODBC
by mje
in thread changing database with DBI and DBD-ODBC
by BeneSphinx
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |