in reply to changing database with DBI and DBD-ODBC

BeneSphinx:

I generally do this:

$DB->do("use new_database");

after the connection is successful to move to the other database.

...roboticus

When your only tool is a hammer, all problems look like your thumb.

Replies are listed 'Best First'.
Re^2: changing database with DBI and DBD-ODBC
by BeneSphinx (Sexton) on Sep 24, 2012 at 20:14 UTC
    roboticus: That worked for me. Thanks! I tried this earlier and for some reason it didn't work for me, but I must not have done it properly. It now works for me both with do() and also with prepare()/execute() (my favorite approach).