Hi All,

I'm trying to execute a select query from a Perl script and display
the results in IE. The script works fine from the command line, it 
displays the results of the query. However, when it runs from IE
it only displays the word 'Start:'. Any ideas? Thanks in advance. -Paul

Here's the script:

#!/usr/bin/perl -w
#
#
#
use strict;
use DBI;
use CGI qw(:standard);

my $oraUser = 'pohashi';
my $oraPass = 'pohashi';

print "Content-type: text/html\n\n";
print "\r\n";
print "Start:<br>\n"th->

my $dbh = DBI->connect("dbi:Oracle:ora817", $oraUser, $oraPass) or die "Can't 
connect for some reason\n";
my $sth = $dbh->prepare("select * from cases");
$sth->execute();

if($sth->err) {die "Error ", $sth->err;}

print "<table>\n<tr>\n";
while (my @eachRow = $sth->fetchrow_array)
{
    foreach my $field(@eachRow)
    {
        print "<td>$field</td>";
    }
    print "</tr>\n";
}
print "</table>\n";
print "Finish:\n";

$sth->finish;
$dbh->disconnect;

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to