Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: changing database with DBI and DBD-ODBC

by mje (Deacon)
on Sep 24, 2012 at 20:25 UTC ( #995437=note: print w/ replies, xml ) Need Help??


in reply to changing database with DBI and DBD-ODBC

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.


Comment on Re: changing database with DBI and DBD-ODBC

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (7)
As of 2014-07-12 08:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (238 votes), past polls