Hi,
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:
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
It fails with:
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)
The driver is a 32bit on (if that's relevant)
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!