Oracle Stored Procedures

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Can anyone help. I'm trying to access an out parameter from an Oracle
Stored Procedure. But I get the following message. I think it might have
something to do with the configuration of our server but I'm not sure.

Warning: ociexecute(): OCIStmtExecute: ORA-06550: line 1, column 20:
PLS-00553: character set name is not recognized ORA-06550: line 0,
column 0: PL/SQL: Compilation unit analysis terminated in
/nfs/rcs/www/webdocs/research/rae2008/staff/dev/rae-system/live/test.php
on line 23

The code is below

<?php

require_once('conn/ora-conn-lib.php');

$c = oraconnect();

 // Create database procedure...
  $s = OCIParse($c, "create procedure proc1(p2 OUT number) as " .
                    "begin" .
                    "  p2 := 10 + 10;" .
                    "end;");
  OCIExecute($s, OCI_DEFAULT);


  // Call database procedure...
 
  $s = OCIParse($c, "begin proc1(:bind2); end;");
  if(!$s){
     die("Problem with passing the SQL. Unable to parse the Oracle
query. Please try something else.\n");
  }
 
  OCIBindByName($s, ":bind2", $out_var, 32); // 32 is the return length

  error_reporting(E_ALL);
  $orares = ociexecute($s);
 
  if(!$orares){
  die("Problem with EXECUTING the SQL. Unable to execute the Oracle
query. Please try something else.\n");
                   $oerr = OCIError();
                   if ($oerr['message']){
                                 echo " The error is<br>$oerr[message]";
                   }
}
 
 
  echo "Procedure returned value: " . $out_var;

  // Logoff from Oracle...
  OCILogoff($c);
 
?>


--------------------------------------------
David Skyers
Support Analyst
Management Systems, EISD, UCL
Extension: 41849
Tel: 020 7679 1849
Email: d.skyers@xxxxxxxxx
-------------------------------------------- 


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux