Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Connect ORACLE to WWW through CGI-Perl-Script
SREESG wrote:
> If you are going to use your own
> PEARL scripts etc, you may have the headache of maintaining
> connections to the DB etc.
Please note, it is Perl, not PEARL (Blame Larry Wall, not me ;-)
It is very easy to get data from Oracle using Tim Bunce's Most Excellent interface, for example:
my $drh = DBI->install_driver('Oracle'); my $dbh = $drh->connect('SID1', '/') || die($DBI::errstr); my $csr = $dbh->prepare("select item, cost from inventory order byitem");
{
print("$item costs $cost<BR>\n");
}
$csr->finish();
$dbh->disconnect();
This in conjunction with the Perl CGI library makes it very easy to
write scripts
that interface to Oracle and to the rest of the world. Try sending
email from
Oracle's WOW interface, for example...
-- Alan Burlison alanburlison_at_unn.unisys.com My opinions may be incorrect, but they are my own.Received on Mon Jan 06 1997 - 00:00:00 CST