Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Here's the error message I am receiving:#! /usr/bin/perl -w use strict; use DBI; my $database="testdb"; my $host="server"; my $port="3306"; my $dsn = "DBI:ODBC:MSSQL:database=$database; host=$host; port=$port"; my $user = 'tester'; my $auth = 'password'; my $dbh = DBI->connect($dsn,$user,$auth,{ RaiseError => 1, AutoCommit +=> 1}); die "Can't connect: " . DBI->errstr() unless $dbh; print "Success: connected\n"; $dbh->disconnect();
Thanks in advance,DBI connect('MSSQL:database=testdb; host=server; port=3306','tester',. +..) failed : [Microsoft][ODBC Driver Manager] Data source name not found and no d +efault dri ver specified (SQL-IM002)(DBD: db_login/SQLConnect err=-1) at dbitest. +pl line 12
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: DBI connection to a remote host
by gnork (Scribe) on Apr 29, 2004 at 09:02 UTC | |
by Anonymous Monk on Apr 29, 2004 at 09:51 UTC | |
by gellyfish (Monsignor) on Apr 29, 2004 at 11:07 UTC | |
by hmerrill (Friar) on Apr 29, 2004 at 12:23 UTC | |
|
Re: DBI connection to a remote host
by gnork (Scribe) on Apr 29, 2004 at 10:26 UTC |