Hi, I have a delphi application that uses oracle as db
server with stored procedures (running ok).

I've been trying to make a php version of such
application with no luck so far.

I've created a user to access such thing and I keep
getting the following error

Warning: OCIStmtExecute: ORA-06550: line 3, column 3:
PLS-00905: object
SYSTEM.CAD013_PSQ_RSV is invalid ORA-06550: line 3,
column 3: PL/SQL:
Statement ignored in
/somewhere/test.php on line 20

Warning: OCIFetchInto: ORA-24338: statement handle not
executed in
/somewhere/test.php on line 31

If I try with user system the messages are diferent

Warning: OCIStmtExecute: ORA-06550: line 3, column 3:
PLS-00905: object SYSTEM.CAD013_PSQ_RSV is invalid
ORA-06550: line 3, column 3: PL/SQL:
Statement ignored in
/somewhere/test.php on line 20

Warning: OCIFetchInto: ORA-24338: statement handle not
executed in /somewhere/test.php on line 31

The script follows


 putenv("ORACLE_BASE=/u01/app/oracle") ;
 putenv("ORACLE_HOME=/u01/app/oracle/product/8.1.7");
 putenv("ORACLE_SID=oracle") ;

  $usernameOracle=dbuser;
  $passwordOracle=dbpassword;
  $hostOracle=dbhost;

 $tsA = time() ;
  $con =
OCIPLogon($usernameOracle,$passwordOracle,$hostOracle);
  $tsD = time() ;

$res = OCINewCursor($con);
$stm = OCIParse ( $con, "
BEGIN
  CAD013_PSQ_RSV(:pkey, :Option, :RES);
END;
");

$name = "foo";
$option = "0";

OCIBindByName ( $stm, ":pkey", $nome, -1);
OCIBindByName ( $stm, ":Option", $option, -1);
OCIBindByName ( $stm, ":RES", &$res, -1, OCI_B_CURSOR
);
@OCIExecute ( $stm );
OCIExecute ($res);

$arrError = OCIError($res);

if ($arrError['code'])
{
  echo
$arrError['code']."-".$arrError['message']."<br>";
  exit;
}

while (OCIFetchInto($res,&$data))

  var_dump($data);
}

OCIFreeCursor($stm);
OCIFreeStatement($res);

The stored procedure has one code bellow

IF (vmINT_QtdLines <= 0) THEN
        -- PHP
              raise_application_error(
              -20005,
              'NAME NOT FOUND'
            );
        -- DELPHI
--          DBMS_OUTPUT.PUT_LINE('NOTHING
FOUND:'||pkey);
--          RAISE Erro;
        END IF;

I am not quite sure where the problem is located.  Any
help (if directly related to oracle emails directly)
wl be appreciated.

Thanks.



__________________________________________________
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to