galen -> perl DBI/DBD connection problem (Jul. 9, '04, 1:03:02 PM) |
I installed unixODBC, freeTDS and am attempting to connect to a SQL Server database using perl DBI and DBD::ODBC. Get the following error when I try to connect:
DBI connect('ETALK','etalk_ro',...) failed: [unixODBC][Driver Manager]Can't ini
iate unicode conversion (SQL-IM003)
[unixODBC][Driver Manager]Can't open lib '/usr/local/lib/libtdsodbc.so' : /usr/
ocal/lib/libiconv.so: cannot open shared object file: No such file or directory
(SQL-01000)(DBD: db_login/SQLConnect err=-1) at .//db2.pl line 23
[unixODBC][Driver Manager]Can't initiate unicode conversion (SQL-IM003)
[unixODBC][Driver Manager]Can't open lib '/usr/local/lib/libtdsodbc.so' : /usr/
ocal/lib/libiconv.so: cannot open shared object file: No such file or directory
(SQL-01000)(DBD: db_login/SQLConnect err=-1)
=====================================================
/usr/local/lib/libiconv.so does not exist.
Here is the perl code:
#!/usr/local/bin/perl
use strict;
use DBI;
my @driver_names = DBI->available_drivers;
foreach (@driver_names)
{
printf "Driver = $_\n";
}
my @datasources = DBI->data_sources("ODBC");
foreach (@datasources)
{
print "Datasource = $_\n";
}
my $dbh = DBI->connect("DBI:ODBC:ETALK", "etalk_ro", "xxxxxxx")
or die "$DBI::errstr\n";
#end perl code
Thanks for any help.
Galen |
|
|
|