M
madan
hi all,
i am getting a error when i use Win32::ODBC..Please check it out and
see weather its working on ur systems..i need to connect to database...
#! /usr/bin/perl
use lib '/cgi-bin/lib';
require("CGI.pm");
use CGI::Carp 'fatalsToBrowser';
use CGI;
use Win32::ODBC;
my $cgi = CGI->new;
$dbh= new Win32::ODBC("dsn=test");
print $cgi->header( 'text/html' );
print $cgi->start_html;
print $cgi->startform("get","/cgi-bin/data.cgi");
if(!$dbh)
{
&printFailure;
exit();
}
else
{
&printSucess;
}
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 coming only when i use Win32::ODBC module..
when i removed it the program is working fine..I checked the dsn,user
name and password all are right...
the following error is shown on the browser..
##########################################################################
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 7.
BEGIN failed--compilation aborted at W:/cgi-bin/dbtest.pl line 7.
############################################################################
i am new to perl...so i dont have enough stuff to write a good
syntax...
thanks in advance
i am getting a error when i use Win32::ODBC..Please check it out and
see weather its working on ur systems..i need to connect to database...
#! /usr/bin/perl
use lib '/cgi-bin/lib';
require("CGI.pm");
use CGI::Carp 'fatalsToBrowser';
use CGI;
use Win32::ODBC;
my $cgi = CGI->new;
$dbh= new Win32::ODBC("dsn=test");
print $cgi->header( 'text/html' );
print $cgi->start_html;
print $cgi->startform("get","/cgi-bin/data.cgi");
if(!$dbh)
{
&printFailure;
exit();
}
else
{
&printSucess;
}
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 coming only when i use Win32::ODBC module..
when i removed it the program is working fine..I checked the dsn,user
name and password all are right...
the following error is shown on the browser..
##########################################################################
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 7.
BEGIN failed--compilation aborted at W:/cgi-bin/dbtest.pl line 7.
############################################################################
i am new to perl...so i dont have enough stuff to write a good
syntax...
thanks in advance