Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Using DBI to make connection to a database

by fishmonger (Chaplain)
on Jul 02, 2015 at 14:08 UTC ( [id://1132986]=note: print w/replies, xml ) Need Help??


in reply to Using DBI to make connection to a database

With the help of Windows' ODBC Data Source Administrator, I have configured a system DSN (named $myDSN)

Since you've already created the DSN via Windows ODBC Data Source Administrator, you just need to use that $myDSN var in your connection string. The ODBC driver will use that name to lookup the connection details (i.e., the specific driver, server name, port, and db name)

my $myDSN = 'data_source_name'; my $dbh = DBI->connect("DBI:ODBC:$myDSN", 'user', 'password', { RaiseError => 1}) or die DBI->errstr;

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (4)
As of 2024-04-24 18:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found