I am connecting to an Oracle DB 11g, with synonym P_ASM_UPDATE_BY_SEQ pointing to my PL SQL procedure ASM_UPDATE_BY_SEQ.
I am trying to get the Update procedure call working. It appears that even though I have assigned an Input Parameter from my form.
The procedure call is not populating the column name. $comando = “BEGIN P_ASM_UPDATE_BY_SEQ(); END;”;
Shouldn’t the column ID be found between the ()?
Do I need to establish each variable as a session variable?
Oracle is generating the following message:
Error updating database -
ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in call to ‘P_ASM_UPDATE_BY_SEQ’ ORA-06550: line 1, column 7: PL/SQL: Statement ignored
Listed below is the generated code in context from the form_…_apl.php file.
$bUpdateOk = true;
$tmp_result = (int) $rs1->fields[0];
if ($tmp_result != 1)
{
$this->Campos_Mens_erro = $this->Ini->Nm_lang['lang_errm_nfnd'];
$this->nmgp_opcao = "nada";
$bUpdateOk = false;
$this->sc_evento = 'update';
}
$aUpdateOk = array();
$bUpdateOk = $bUpdateOk && empty($aUpdateOk);
if ($bUpdateOk)
{
$rs1->Close();
if (in_array(strtolower($this->Ini->nm_tpbanco), $this->Ini->nm_bases_oracle))
{
$comando = "BEGIN P_ASM_UPDATE_BY_SEQ(); END;";
}
else
{
$comando = "P_ASM_UPDATE_BY_SEQ";
}
$comando = str_replace("'null'", "null", $comando) ;
$comando = str_replace("#null#", "null", $comando) ;
if ($SC_ex_update || $SC_tem_cmp_update)
Here is the Compiled PL SQL Procedure Code:
CREATE OR REPLACE PROCEDURE CORE.ASM_UPDATE_BY_SEQ
(
p_seq IN INTEGER
, p_parent IN VARCHAR2
, p_child IN VARCHAR2
, p_child_alias IN VARCHAR2
) AS
BEGIN
UPDATE Core.account_structure_master asm
SET asm.account_parent = p_parent,
asm.account_child = p_child,
asm.account_child_alias = p_child_alias
WHERE asm.account_structure_seq = p_seq;
END ASM_UPDATE_BY_SEQ;