M
madan
hello Mr.John Bokma
thanks for ur replay..but i modified the source code as u specified but
still some error is coming...
the modified program is as below
#######################################################################
#! /usr/bin/perl
use lib '/cgi-bin/lib';
require("CGI.pm");
use strict;
use warnings;
use CGI::Carp 'fatalsToBrowser';
use CGI;
use Win32::ODBC;
my $cgi = CGI->new;
$dbh= new Win32::ODBC("dsn=madan; uid=madan; pwd=madan");
if(!$dbh)
{
&printFailure;
exit();
}
else
{
&printSucess;
}
print $cgi->header( 'text/html' );
print $cgi->start_html;
print $cgi->startform("get","/cgi-bin/data.cgi");
sub printFailure {
print "failure in connecting <br>".Win32::ODBC::Error();
}
sub printSucess {
print "Connection Sucessful<br>";
}
print $cgi->endform;
print $cgi->end_html;
########################################################################
the following error is being displayed on the screen:
#######################################################################
Software error:
Undefined subroutine &Scalar::Util::blessed called at
W:/usr/lib/overload.pm line 89.
Compilation failed in require at W:/usr/lib/Config.pm line 70.
Compilation failed in require at W:/usr/site/lib/Win32/ODBC.pm line 27.
Compilation failed in require at W:/cgi-bin/dbtest.pl line 10.
BEGIN failed--compilation aborted at W:/cgi-bin/dbtest.pl line 10.
########################################################################
thanks for ur replay..but i modified the source code as u specified but
still some error is coming...
the modified program is as below
#######################################################################
#! /usr/bin/perl
use lib '/cgi-bin/lib';
require("CGI.pm");
use strict;
use warnings;
use CGI::Carp 'fatalsToBrowser';
use CGI;
use Win32::ODBC;
my $cgi = CGI->new;
$dbh= new Win32::ODBC("dsn=madan; uid=madan; pwd=madan");
if(!$dbh)
{
&printFailure;
exit();
}
else
{
&printSucess;
}
print $cgi->header( 'text/html' );
print $cgi->start_html;
print $cgi->startform("get","/cgi-bin/data.cgi");
sub printFailure {
print "failure in connecting <br>".Win32::ODBC::Error();
}
sub printSucess {
print "Connection Sucessful<br>";
}
print $cgi->endform;
print $cgi->end_html;
########################################################################
the following error is being displayed on the screen:
#######################################################################
Software error:
Undefined subroutine &Scalar::Util::blessed called at
W:/usr/lib/overload.pm line 89.
Compilation failed in require at W:/usr/lib/Config.pm line 70.
Compilation failed in require at W:/usr/site/lib/Win32/ODBC.pm line 27.
Compilation failed in require at W:/cgi-bin/dbtest.pl line 10.
BEGIN failed--compilation aborted at W:/cgi-bin/dbtest.pl line 10.
########################################################################