Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: changing database with DBI and DBD-ODBC

by roboticus (Chancellor)
on Sep 24, 2012 at 19:52 UTC ( #995435=note: print w/ replies, xml ) Need Help??


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.


Comment on Re: changing database with DBI and DBD-ODBC
Download Code
Replies are listed 'Best First'.
Re^2: changing database with DBI and DBD-ODBC
by BeneSphinx (Acolyte) 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).

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://995435]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (17)
As of 2015-07-31 14:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (278 votes), past polls