title: oci_execute identifier must be declared ORA-06550
body: <p>The procedure:</p>
  
  <pre><code>FUNCTION f_exists (
    p_pidm                      gobansr.gobansr_pidm%TYPE,
    p_num                       gobansr.gobansr_num%TYPE,
    p_rowid                     gb_common.internal_record_id_type DEFAULT NULL)
  RETURN VARCHAR2 IS
  --
    TYPE queryone_ref IS REF CURSOR;
    lv_cursor queryone_ref;
    lv_tempout VARCHAR2(1) := 'N';
  BEGIN
  --
  -- Assign the cursor variable to the appropriate cursor
  --
    IF p_rowid IS NOT NULL THEN
      OPEN lv_cursor for
      SELECT 'Y'
        FROM gobansr
       WHERE ROWID = p_rowid;
    ELSE
      OPEN lv_cursor for
      SELECT 'Y'
        FROM gobansr
       WHERE gobansr_pidm = p_pidm
         AND gobansr_num = p_num;
    END IF;
    FETCH lv_cursor INTO lv_tempout;
    CLOSE lv_cursor;
    RETURN lv_tempout;
  END f_exists;
  </code></pre>
  
  <p>PHP Code to run/query the stored procedure:</p>
  
  <pre><code>$conn = oci_connect($username, $password, $db);
  $sql = 'BEGIN "gb_pin_answer"."f_exists"(:p_pidm, :p_num); END;';
  $stmt = oci_parse($conn, $sql);
  
  if (!$conn)
    exit("DB did not connect.");
  
  $p_pidm = 36706;
  $p_num = 1;
  
  oci_bind_by_name($stmt,':p_pidm',$p_pidm,5);
  oci_bind_by_name($stmt,':p_num',$p_num,1);
  
  if (!oci_execute($stmt))
    exit("Procedure Failed.");
  
  oci_commit($conn);
  oci_close($conn);
  </code></pre>
  
  <p>I have verified with the DBA that I have execute privileges to the stored procedure and the PHP successfully connects to the database server.</p>
  
  <p>It returns this error:</p>
  
  <blockquote>
    <p>Message: oci_execute(): ORA-06550: line 1, column 8: PLS-00201:
    identifier 'gb_pin_answer.f_exists' must be declared ORA-06550: line
    1, column 8: PL/SQL: Statement ignored</p>
  </blockquote>
  
  <p>UPDATE:</p>
  
  <p>I was able to run: <code>select gb_pin_answer.f_exists('36706','2') as RESULT from dual</code> and it returned Y</p>
  
  <p>Now I need to figure out how to go about using this stored procedure in my php:</p>
  
  <pre><code>PROCEDURE p_create(
    p_pidm                      gobansr.gobansr_pidm%TYPE,
    p_num                       gobansr.gobansr_num%TYPE,
    p_gobqstn_id                gobansr.gobansr_gobqstn_id%TYPE DEFAULT NULL,
    p_qstn_desc                 gobansr.gobansr_qstn_desc%TYPE DEFAULT NULL,
    p_ansr_desc                 gobansr.gobansr_ansr_desc%TYPE,
    p_ansr_salt                 gobansr.gobansr_ansr_salt%TYPE,
    p_user_id                   gobansr.gobansr_user_id%TYPE DEFAULT gb_common.f_sct_user,
    p_data_origin               gobansr.gobansr_data_origin%TYPE,
    p_rowid_out             OUT gb_common.internal_record_id_type) IS
  --
    lv_gobansr_rec    gobansr%ROWTYPE;
    error_message     gb_common_strings.err_type;
  
    lv_hashed_answer  gobansr.gobansr_ansr_Desc%type;
    lv_salt           gobansr.gobansr_ansr_salt%type;
  BEGIN
  --
  -- Make sure the record doesn't already exist
  --
    IF (gb_pin_answer.f_exists(p_pidm,p_num)='Y') THEN
      error_message :=  gb_common_strings.f_append_error(error_message,
                          gb_pin_answer_strings.f_get_error('RECORD_EXISTS'));
    END IF;
  --
    IF (error_message IS NOT NULL) THEN
      RAISE_APPLICATION_ERROR(gb_common_strings.ERR_CODE, error_message);
    END IF;
  
    lv_salt := gspcrpt.F_GET_SALT(length(replace(p_ansr_desc,' ')));
    gspcrpt.p_saltedhash(lower(replace(p_ansr_desc,' ')),lv_salt,lv_hashed_answer);
  
  --
  -- Execute business rules
  --
    gb_pin_answer_rules.p_validate(
      p_pidm               =&gt; p_pidm,
      p_num                =&gt; p_num,
      p_gobqstn_id         =&gt; p_gobqstn_id,
      p_qstn_desc          =&gt; p_qstn_desc,
      p_ansr_desc          =&gt; p_ansr_desc,
      p_ansr_salt          =&gt; lv_salt,
      p_user_id            =&gt; p_user_id,
      p_data_origin        =&gt; p_data_origin);
  --
  -- This is where the local user exit call, if defined, will occur.
  --
    /* -- No local call
      p_pidm                     =&gt; p_pidm,
      p_num                      =&gt; p_num,
      p_gobqstn_id               =&gt; p_gobqstn_id,
      p_qstn_desc                =&gt; p_qstn_desc,
      p_ansr_desc                =&gt; p_ansr_desc,
      p_ansr_salt                =&gt; lv_salt,
      p_user_id                  =&gt; p_user_id,
      p_data_origin              =&gt; p_data_origin);
  */
  --
  -- Build the DML record
  --
    lv_gobansr_rec := f_build_gobansr_rec(
      p_pidm               =&gt; p_pidm,
      p_num                =&gt; p_num,
      p_gobqstn_id         =&gt; p_gobqstn_id,
      p_qstn_desc          =&gt; p_qstn_desc,
      p_ansr_desc          =&gt; lv_hashed_answer,
      p_ansr_salt          =&gt; lv_salt,
      p_user_id            =&gt; p_user_id,
      p_data_origin        =&gt; p_data_origin);
  --
  -- Set the activity date
  --
    lv_gobansr_rec.gobansr_activity_date := SYSDATE;
  --
  -- Delegate to the DML layer
  --
  
    dml_gobansr.p_insert(lv_gobansr_rec, p_rowid_out);
  --
  -- NOTE:  Banner Messaging Support logic is only called after a
  --        successful DML operation
  -- Check if messaging is enabled/licensed for this business entity.
  --
    IF (gb_event.f_entity_publishable(gb_event.baseline_ind,
                                          M_ENTITY_NAME)) THEN
  --    Register this business entity with messaging support.
      gb_pin_answer_rules.p_register_entity(
        p_operation_type     =&gt; gb_event.CREATE_OPERATION,
        p_pidm               =&gt; p_pidm,
        p_num                =&gt; p_num,
        p_gobqstn_id         =&gt; p_gobqstn_id,
        p_qstn_desc          =&gt; p_qstn_desc,
        p_ansr_desc          =&gt; p_ansr_desc,
        p_ansr_salt          =&gt; p_ansr_salt,
        p_user_id            =&gt; p_user_id,
        p_data_origin        =&gt; p_data_origin,
        p_internal_record_id =&gt; p_rowid_out);
    END IF;
  END p_create;
  </code></pre>