Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^2: 'use database' for sqlserver (connectionstrings)

by runrig (Abbot)
on May 22, 2013 at 01:18 UTC ( #1034654=note: print w/replies, xml ) Need Help??


in reply to Re: 'use database' for sqlserver (connectionstrings)
in thread 'use database' for sqlserver

I use $dbh->do("use $database"); ('$database' is sufficiently trusted in my env, YMMV). Putting the database into the connect string, at least for DBD::Sybase (I don't know about DBD::ODBC), resulted in a warning when I really wanted it to throw an error, e.g., when the server was up, but the database was not 'ready'. The do(..) method throws an error if RaiseError is set.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1034654]
help
Chatterbox?
[holli]: I got into a fight yesterday and won.
[holli]: No, that's not true. I started it.
[holli]: I was company to my mother, bringing her to the therapy she has to take. There was another so called therapist outside smoking. We engaged in a talk with her and he turned out to be one of these lunatics telling people when they are sick it's their own
[holli]: fault for not thinking positively enough.

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (6)
As of 2017-12-13 17:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What programming language do you hate the most?




















    Results (373 votes). Check out past polls.

    Notices?