title: Write in CLOB using C++ and OCCI
body: <p>I'm developing a C++ application that populates an Oracle (11g) database. This database has a package with the following signature:</p>
  
  <pre><code>FUNCTION SAVE_CONF
  (I_USER IN VARCHAR2
  ,I_APP IN VARCHAR2
  ,I_CONTEXT IN VARCHAR2
  ,O_CFG OUT SYS_REFCURSOR  --CLOB
  ,O_ERROR_MSG OUT VARCHAR2
  )
  RETURN NUMBER;
  </code></pre>
  
  <p>However, i cannot access the O_CFG refcursor in my application. This is how I define my SQL statement.</p>
  
  <pre><code>OraStmt-&gt;setSQL("BEGIN :1 := SCHM.PCK.SAVE_CONF(:2,:3,:4,:5,:6); END;");
  OraStmt-&gt;registerOutParam(1, OCCIINT);
  OraStmt-&gt;setString(2, User.GetBuffer(0));
  OraStmt-&gt;setString(3, App.GetBuffer(0));
  OraStmt-&gt;setString(4, Context.GetBuffer(0));         
  OraStmt-&gt;registerOutParam(5,OCCICLOB);
  OraStmt-&gt;registerOutParam(6,OCCISTRING,32767);
  OraStmt-&gt;setAutoCommit(FALSE);
  
  OraStmt-&gt;executeQuery(); 
  </code></pre>
  
  <p>However, I'm not able to define the 5th argument data type. I've already tried to use a OCCICURSOR, a OCCIREF, and many other data types.</p>
  
  <p>When the instruction <code>executeQuery()</code> is performed, an oracle::occi::SQLException is thrown with an ORA-6550. This ORA suggests an argument type mismatch.</p>
  
  <p>I have worked with writing in CLOBs before but never through a REFCURSOR.</p>