title: Oracle APEX: Setting "Display Image" page item through PL SQL
body: <p>I have a table <code>IMAGE_TABLE</code> with two columns <code>ID - NUMBER</code> and <code>IMAGE - BLOB</code>. I have an APEX page with page item <code>P1_ID</code> as hidden and <code>P1_IMAGE</code> with type as <code>"Diaplay Image"</code> and "Based On" as "BLOB Column returned by SQL Statement".</p>
  
  <p>SQL is as follows: <code>SELECT IMAGE FROM IMAGE_TABLE WHERE ID = :P1_ID;</code></p>
  
  <p>On page load, I set P1_ID as 1.</p>
  
  <p>I have two buttons, "Previous" &amp; "Next". When Next button is pressed, I want to get the next image with a dynamic action with true action as "Execute PL/SQL Code" and code as follows.</p>
  
  <pre><code>:P1_ID := :P1_ID + 1; ( :P1_ID := :P1_ID - 1; for PREV button )
  SELECT IMAGE INTO :P1_IMAGE FROM IMAGE_TABLE WHERE ID = :P1_ID;
  </code></pre>
  
  <p>Items to Submit: <code>:P1_ID</code></p>
  
  <p>Items to Return: <code>:P1_ID, :P1_IMAGE</code></p>
  
  <p>When I save this PL/SQL Code, I am getting an error <code>"ORA-06550: line 23, column 8: PL/SQL: ORA-00932: inconsistent datatypes: expected NUMBER got BLOB"</code>.</p>
  
  <p>The idea is that I don't want to submit the page again with the next or prev button clicks but do a region refresh (as the second true action to this dynamic action) to load the new image.</p>
  
  <p>Any clue on what my mistake is and how to achieve this ?</p>
  
  <p>My APEX version is "18.1" and Oracle version is "11g Express Edition Release 11.2.0.2.0 - 64bit Production"</p>
  
  <p>Thank you in advance.</p>