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

Home -> Community -> Usenet -> c.d.o.misc -> Re: absolute newbie: perl-cgi+oracle

Re: absolute newbie: perl-cgi+oracle

From: Vladislav Serbin <Vladislav.Serbin_at_Trais.com.ua>
Date: Thu, 26 Sep 2002 16:24:36 +0300
Message-ID: <amv1k8$q8$1@DCS.eurocom.od.ua>


Hi! See below-

#!/usr/bin/perl -w
use DBI;
use CGI;
use CGI::Carp('fatalsToBrowser');
print "Content-type:text/html\n\n";
print <<EHTML;
<html>
<head>
<title>Sequence retriever</title>
</head>
<body>

EHTML
my $dbh =
DBI->connect("dbi:Oracle:my_test","system",pwd,{ RaiseError => 1, AutoCommit => 1 }) ||
die("Nope. Didn't make it\n");
my $sth = $dbh->prepare(qq{
SELECT * FROM SYS.USER_SEQUENCES});
$sth->execute();
while(@data = $sth->fetchrow_array()){
print "@data\n<br>";
}
$sth->finish;
$dbh->disconnect;
print <<EHTML;
</body>
</html>

EHTML /* output -

Content-type:text/html

<html>
<head>
<title>Sequence retriever</title>
</head>
<body>

REPCAT$_FLAVORS_S 1 999999999999999999999999999 1 N N 0 1

<br>REPCAT$_REFRESH_TEMPLATES_S 1 999999999999999999999999999 1 N N 20 1
<br>REPCAT$_REPPROP_KEY 1 999999999999999999999999999 1 N N 20 1
<br>REPCAT$_RUNTIME_PARMS_S 1 999999999999999999999999999 1 N N 20 1
<br>REPCAT$_TEMPLATE_OBJECTS_S 1 999999999999999999999999999 1 N N 20 1
<br>REPCAT$_TEMPLATE_PARMS_S 1 999999999999999999999999999 1 N N 20 1
<br>REPCAT$_TEMPLATE_SITES_S 1 999999999999999999999999999 1 N N 20 1
<br>REPCAT$_TEMP_OUTPUT_S 1 999999999999999999999999999 1 N N 20 1
<br>REPCAT$_USER_AUTHORIZATIONS_S 1 999999999999999999999999999 1 N N 20 1
<br>REPCAT$_USER_PARM_VALUES_S 1 999999999999999999999999999 1 N N 20 1
<br>REPCAT_LOG_SEQUENCE 1 999999999999999999999999999 1 N N 20 1
<br></body>
</html>
........................

Best regards,
Vladislav Serbin
Oracle DBA Received on Thu Sep 26 2002 - 08:24:36 CDT

Original text of this message

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