Hello all,
I'm having trouble connecting to Teradata using ODBC. The error that I am receiving is...
DataDirectODBC lib Specified driver could not be loaded (SQL-IM003)(DBD: db_login/SQLConnect err=-1) at ...
I know that my username and password are correct. I think that I might be missing something in my environment setup though. Here is the code in question:
use strict;
use File::Basename;
use Cwd;
use Date::Calc qw(Today Now);
use Sys::Hostname;
use DBI;
use DBD::ODBC::Teradata;
eval {
my $tddsn = "odbc_entry";
my $tduser = "username";
my $tdpass = "password";
$ENV{'ODBCINI'} = '/path/to/.odbc.ini';
my $tddbh = DBI->connect("DBI:ODBC:DSN=$tddsn", $tduser, $tdpass,
+{PrintError => 0, RaiseError => 0 }) or die $DBI::errstr;
} unless ($@);
Thanks for your help.