title: How to execute PL/SQL code from file and pass blob as parameter
body: <p>I have PL/SQL code such as </p>
  
  <pre><code>   begin
        update table set value_blob = empty_blob()
        where expr_id = 2
        returning value_blob into :fileData;
        update table set value_text = 'test'
        where expr_id = 2;
      end;
  </code></pre>
  
  <p>that stored in file. I am trying to execute this procedure and pass another file as <strong>:fileData</strong> parameter: </p>
  
  <pre><code>public void handle(String connectionString, String procedure, byte[] dataFile) throws Exception {
  
      OracleDataSource ods = new OracleDataSource();
      ods.setURL(connectionString);
  
      try(Connection conn = ods.getConnection();
          CallableStatement statement = conn.prepareCall(procedure);
          InputStream inputStream = new ByteArrayInputStream(dataFile)) {
  
          statement.setBinaryStream("fileData", inputStream, dataFile.length);
          statement.executeUpdate();
  
      } catch (Exception e) {
          throw e;
      }
  }
  </code></pre>
  
  <p>After executing i have <em>'test'</em> value in <strong>value_txt</strong> column, but no data in <strong>value_blob</strong> column. Previous data in this column was changed to empty blob. I tried both named and numbered parameters and i am sure that dataFile byte array is not empty.</p>