M
madan
hi all,
i am getting the error "Premature end of script headers" when ever i
include use Win32::ODBC.
i need to connect to database...
my code is as below..
#! /usr/bin/perl
push(@INC,"/cgi-bin");
require("cgi-lib.pl");
require("CGI.pm");
$query=new CGI;
print &PrintHeader;
print $query->start_html;
print $query->startform("get","/cgi-bin/data.cgi");
use Win32::ODBC;
$dbh= new Win32::ODBC("dsn=madan; uid=madan; pwd=madan");
print "<input type=text name=dsn value=$dsn><br>";
print "<center>The List of Tables That are specified in the DataBase
you Entered are:<br>";
if(!$dbh)
{
print "failure in connecting ".Win32::ODBC::Error();
exit();
}
else
{
print "Connection Sucessful<br>";
}
$dbh->Connection();
foreach $Temp ($dbh->TableList())
{
$Table = $Temp;
print "<option value=$Table>$Table";
}
print "</select><br><br>";
print "<br><br><input type=submit value=Submit>";
print $query->endform;
print $query->end_html
thanks in advance
madan chowdary
Edit/Delete Message
i am getting the error "Premature end of script headers" when ever i
include use Win32::ODBC.
i need to connect to database...
my code is as below..
#! /usr/bin/perl
push(@INC,"/cgi-bin");
require("cgi-lib.pl");
require("CGI.pm");
$query=new CGI;
print &PrintHeader;
print $query->start_html;
print $query->startform("get","/cgi-bin/data.cgi");
use Win32::ODBC;
$dbh= new Win32::ODBC("dsn=madan; uid=madan; pwd=madan");
print "<input type=text name=dsn value=$dsn><br>";
print "<center>The List of Tables That are specified in the DataBase
you Entered are:<br>";
if(!$dbh)
{
print "failure in connecting ".Win32::ODBC::Error();
exit();
}
else
{
print "Connection Sucessful<br>";
}
$dbh->Connection();
foreach $Temp ($dbh->TableList())
{
$Table = $Temp;
print "<option value=$Table>$Table";
}
print "</select><br><br>";
print "<br><br><input type=submit value=Submit>";
print $query->endform;
print $query->end_html
thanks in advance
madan chowdary
Edit/Delete Message