Re: Perl scripts

From: Jacqui Caren <Jacqui.Caren_at_ig.co.uk>
Date: 1996/11/15
Message-ID: <E0xot2.6Fq_at_ig.co.uk>#1/1


In article <328B3CD0.167E_at_ikb.mavt.ethz.ch>, Margarita Smits <ikbhsmit_at_ikb.mavt.ethz.ch> wrote:
>Hi all,
>
>
>I'm looking for some examples of Perl scripts with Oracle.
>
>For instance: reading, manipulating, updating Oracle data within
>the Perl program.
>
>Does anybody know their location ?
>
>kind regards
>Margarita

here is a simple select/process loop...
if you want more complex examples email me.

getting into multiple lda's and cursors can look messy but can really implrove performance in some apps

#!/bin/env perl

use Oraperl;

my $lda = ora_login('','user','pass');
die("$0: login error $ora_errstr\n") if $ora_errno;

my $csr = ora_open($lda,"select table_name from user_tables"); die ....

while ( ($tname) = ora_fetch($csr)) {

        print "$tname\n";

}
ora_close($csr);
ora_logoff($lda);

exit 0;

-- 
Jacqui Caren, Software Systems, Paul Ingram Group Ltd. J.Caren_at_ig.co.uk
Commercial perl resources - support,training,products etc
 http://www.perl.co.uk/ - to get an entry - contact www_at_perl.co.uk
AD: Need flexible, high quality reporting? - www.perl.co.uk/ig/dp.html
Received on Fri Nov 15 1996 - 00:00:00 CET

Original text of this message