Some problemas with Oracle Packages.

wxdqz

New Member
Sorry bring again a yet discussed topic, but I couldn磘 find help in the messages about stored procedures in packages with Oracle. I磛e tried everything... But I can磘 get the return.

See my code:


<?PHP

include ("db.php");
$dbase = new DB;
$cnn = $dbase->conecta();


$usuario = "AMA123";
$senha = "CPEDAN";

$st = "BEGIN PACK_USUARIO.PROC_LOGIN '$usuario',:codigo_saida,'$senha'); END;";
$stmt = OCIParse($cnn,$st);
OCIBindByName($stmt,":codigo_saida",&$resp,-1);
OCIExecute($stmt);

echo "DONE!!";

?>


I already have tried to create cursor, Bind with :, without :, et cetera, just fail.
The last error message told me "wrong type or number of parameters" in Execute.

Could some help me, please? Thank you.

Here is the Procedure:

PROCEDURE PROC_LOGIN(
codigo IN varchar2,
codigo_saida OUT t_usu_codigo,
usu_senha IN varchar2)
IS
BEGIN
SELECT USU_CODIGO
INTO codigo_saida (1)
FROM USU
WHERE USU_CODIGO = CODIGO
AND USU_SENHA = usu_senha;
END PROC_LOGIN;
 
Back
Top