I'm working on a Solaris box, trying to connect to a remote SQL Server 7 running on a WinNT box.
I've installed the following on my Solaris box:
No errors during install. I am able to use the 'tsql' tool found in the bin dir of freeTDS to connect to my remote MS SQL Sever.
However, I can't seem to get DBD::Sybase to work. I've gotten a number of software error messages to display, when I try using the following CGI code:
#!/usr/local/bin/perl # use DBI; my $DB_Server = "DBServer"; my $DB_User = "gues"; my $DB_Pass = "test"; print "DB_Server:[$DB_Server] DB_User:[$DB_User] DB_Pass:[$DB_Pass]"; BEGIN { $ENV{SYBASE} = '/usr/local/freetds/'; } my $dbh = DBI->connect("dbi:Sybase:server=$DB_Server", $DB_User, $DB_P +ass, {PrintError => 0}); die "Unable for connect to server $DBI::errstr" unless $dbh; my $rc; my $sth; $sth = $dbh->prepare("select \@\@servername"); if($sth->execute) { while(@dat = $sth->fetchrow) { print "@dat\n"; } } $dbh->disconnect();
The most recent error message was:
DBD::Sybase initialisation failed: Had to create DBD::Sybase::dr::imp_data_size unexpectedly at /usr/local/lib/perl5/site_perl/5.6.1/sun4-solaris/DBI.pm line 713.
(in cleanup) dbih_getcom handle DBI::dr=HASH(0xa34fc8) is not a DBI handle (has no magic) at /usr/local/lib/perl5/site_perl/5.6.1/sun4-solaris/DBI.pm line 713.
(in cleanup) dbih_getcom handle DBI::dr=HASH(0xa34fc8) is not a DBI handle (has no magic) at /usr/local/lib/perl5/site_perl/5.6.1/sun4-solaris/DBI.pm line 537.
at /var/apache/htdocs/test.cgi line 14
Do I have an error with DBD::Sybase? Should I try an earlier version? Could there be a missing link? or ENV setting? Any thoughts? Feedback? Assistance?
Thanks!
In reply to DBD::Sybase Woes by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |