P is for Practical | |
PerlMonks |
Jonathan has asked for the wisdom of the Perl Monks concerning the following question:
I have to access an old Sage MAS 90 database, I can connect fine with an ODBC query tool using the connection string "Driver={MAS 90 4.0 ODBC Driver};Directory=S:\v440\MAS90"
But when I try with Perl I get:
It fails with:use strict; use warnings; use DBI; my $dbuser = "user"; my $dbpassword = "password"; # SOTAMAS90 my $CONNECT = 'Driver={MAS 90 4.0 ODBC Driver};Directory=S:\v440\MAS90 +'; my $dbh = DBI->connect("dbi:ODBC:$CONNECT", "$dbuser", "$dbpassword") or die "Cannot connect to $CONNECT: $DBI::errstr\n"; $dbh->disconnect
The driver is a 32bit on (if that's relevant)C:\>test_1.pl DBI connect('Driver={MAS 90 4.0 ODBC Driver}','user',...) failed: [Mic +rosoft][ODBC Driver Manager] Data source name not found and no defaul +t driver specified (SQL-IM002) at C:\test_1.pl line 11. Cannot connect to Driver={MAS 90 4.0 ODBC Driver}: [Microsoft][ODBC Dr +iver Manager] Data source name not found and no default driver specif +ied (SQL-IM002)
I've also tried using its user DSN name SOTAMAS90 instead but that fails as well.
I've never used ODBC before and am not used to working on Windows so any help to helping me connect would be great!
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: ODBC problem
by afoken (Chancellor) on Feb 24, 2021 at 14:10 UTC | |
Re: ODBC problem
by marto (Cardinal) on Feb 24, 2021 at 13:57 UTC | |
Re: ODBC problem
by Corion (Patriarch) on Feb 24, 2021 at 13:59 UTC | |
Re: ODBC problem
by hippo (Bishop) on Feb 24, 2021 at 20:03 UTC | |
Re: ODBC problem
by Jonathan (Curate) on Mar 02, 2021 at 13:08 UTC | |
Re: ODBC problem
by Jonathan (Curate) on Feb 25, 2021 at 09:59 UTC | |
by LanX (Saint) on Feb 25, 2021 at 10:45 UTC | |
Re: ODBC problem
by Anonymous Monk on Feb 25, 2021 at 15:50 UTC | |
Re: ODBC problem
by Anonymous Monk on Feb 24, 2021 at 18:05 UTC |