SC Version 8.00.006 - Update Procedure Broken - Oracle Professioal Edition

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;

Where and how do you call this procedure on your application?

I see 4 parameters in the call that are needed
p_seq IN INTEGER
, p_parent IN VARCHAR2
, p_child IN VARCHAR2
, p_child_alias IN VARCHAR2

I dont see your call of the procedure use those 4 paramaters… Hence the error looks correct.
Apparently some extra info is needed to answer this.

Yes the procedure call generated by scriptcase has “()” nothing between the parenthesis.

Are we as developers responsible for entering the scriptcase fields or should the tool be doing this for us?

I tried using $comando = “BEGIN P_ASM_UPDATE_BY_SEQ(:account_structure_seq_, :account_parent, :account_child, :account_child_alias); END;”; …Results in an ORA-01008 error referencing that the these are not bound variables.

Also tried using $comando = “BEGIN P_ASM_UPDATE_BY_SEQ(account_structure_seq_, account_parent_, account_child_, account_child_alias_); END;”; …Results in an ORA-06550 must be declared

Also tried using $comando = “BEGIN P_ASM_UPDATE_BY_SEQ(account_structure_seq, account_parent, account_child, account_child_alias); END;”; …Results in an ORA-06550 must be declared

If we are supposed to what would the format be? If so what variables to we use from the form…apl

As you can tell I am new to scriptcase and PHP. But I am an experienced programmer. I really should get one of the debug tools mentioned elsewhere on the forum. Then I would know what variables from the form contains the changes that i entered on the screen before selecting the update button.

Thank you for your input, I greatly appreciate it.

I see all of these references in the code…

var $account_structure_seq_;

or are the contents contained an and arrary structure. $this->sc_conv_var[‘account_structure_seq’] = “account_structure_seq_”;

if (isset($this->account_structure_seq_)) { $this->nm_limpa_alfa($this->account_structure_seq_);

$this->account_structure_seq_ = $GLOBALS[“account_structure_seq_” . $sc_seq_vert];

The code is being generated by using the update procedure selection.

scriptcase - UPDATE Procedures Parameters.jpg