Hello...
I'm getting this message "Can't call method "do" on an undefined value" when trying to connect to Sybase database using CGI.. this is some parts of the code i have. The code works in one machine but it doesn't work with a different machine. Do you know what would cause this error or what could be different between the machines?
Thanks,
Jen
use DBI;
use CGI;
my $dbh;
.......
$ENV{'SYBASE'} = "/opt/sybase/" unless (defined $ENV{'SYBASE'});
...................
eval {
$dbh=DBI->connect("dbi:Sybase:server=$DATA_SOURCE", $USERID, $PWD);
};
if( DBI::errstr eq "")
{
$dbh->do("use TOPAZ");
...........


Reply With Quote
Bookmarks