rbc has asked for the wisdom of the Perl Monks concerning the following question:
Here's the error message ...#!/usr/bin/perl -w use strict; use DBI; use Getopt::Std; use vars qw/ $opt_d $opt_u $opt_p /; my $db = 'SPROD'; my $user = 'SPROD'; my $pass = 'SPROD'; my $dbd = 'Oracle'; my $sql = 'exec RBC_test( :? );'; getopts ( "d:u:p:h" ); if ( $opt_d ) { $db = $opt_d; } if ( $opt_u ) { $user = $opt_u; } if ( $opt_p ) { $pass = $opt_p; } my $dbh = DBI->connect ( $db, $user, $pass, $dbd ); if( !$dbh ) { print "Cannot connect to database: $DBI::errstr\n"; die "Terminating\n"; } my $sth = $dbh->prepare( $sql ); #$sth->bind_param( ":p", 123 ); $sth->execute(321) or print "Error [" . $sth->errstr . "]\n"; my $rc = $dbh->disconnect(); print "Disconnected rc = $rc\n";
procedure RBC_test is very simple procedure that takes oneError [ORA-00900: invalid SQL statement (DBD ERROR: OCIStmtExecute)] Disconnected rc = 1
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: DBI/Oracle stored procedure newbee question
by metadatum (Scribe) on Aug 22, 2002 at 18:30 UTC | |
|
Re: DBI/Oracle stored procedure newbee question
by DamnDirtyApe (Curate) on Aug 22, 2002 at 18:30 UTC |