Re: Mosaic <-> Oracle

From: Wolfgang Breitling 296-7085 <breitlin_at_cuug.ab.ca>
Date: Wed, 9 Nov 1994 13:45:04 GMT
Message-ID: <Cz0675.Fz7_at_cuug.ab.ca>


Keith T. Crowder (gt6328c_at_prism.gatech.edu) wrote:
> currently, I am using oraperl to access an ORACLE v7 database through
> Mosaic, the problem I am having is that I seem to be
> having a problem with memory allocation under Mosaic.
> Basically, when I run my program from a command line
> it will work fine. But, when I have the program
> called via a <FORM> in Mosaic, I am storing the
> results of a SELECT xx FROM xxx into an array, and
> it is coming back with nothing. Does anyone know
> any way around this, i.e. use environ vars, etc..
> or am I just coding it wrong?
 

> any help would be appreciated. Thanks in advance...

I believe you have to use a cursor. This is some code that works for me:

die "userid/password required!\n" unless $#ARGV == 0; ($owner,$passwd) = split(/\//,$ARGV[0]); $lda = &ora_login($ENV{'ORACLE_SID'}, $owner, $passwd)

        || die $ora_errstr;
$csr = &ora_open($lda, "select view_name from sys.user_views")

        || die $ora_errstr;

while (($view_name) = &ora_fetch($csr))
{

        _at_views[++$#views] = $view_name; }

do ora_close($csr) || die "can't close cursor";

... Received on Wed Nov 09 1994 - 14:45:04 CET

Original text of this message