I don't use "DSN=" in my working code, just the exact DSN name as it appears between brackets in my odbc.ini
Works fine against several different instances with different versions, default and named instances both Express, Standard and Enterprise.
my $dbh = DBI->connect("dbi:ODBC:$instance", "########", "########");
For the sake of completeness, here are some example entries (anonymized) from odbc.ini:
[SRV2]
Description = A default instance and port specified because server isn
+'t running a "browser" listener.
Driver = FreeTDS
Server = n.n.n.n
Port = 1433
Database = whatever
TDS_Version = 9.0
try server login = yes
[SRV1-INST1]
Description = A named instance, no port specified because so it will u
+se the "browser" listening port
Driver = FreeTDS
Server = n.n.n.n\INST1
Database = whatever
TDS_Version = 9.0
try server login = yes
-- FloydATC
I got 99 problems, most of them have to do with printers.
|