Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Connect ORACLE to WWW through CGI-Perl-Script

Re: Connect ORACLE to WWW through CGI-Perl-Script

From: Alan Burlison <alanburlison_at_unn.unisys.com>
Date: 1997/01/06
Message-ID: <32D133B2.BD4@unn.unisys.com>#1/1

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 by
item");
$csr->execute();
my ($item, $cost);
while (($item, $cost) = $csr->fetchrow())

   {
   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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US