Note that there are some explanatory texts on larger screens.

plurals
  1. POoracle occi getString gives _BLOCK_TYPE_IS_VALID(pHead->nBlockUse)
    primarykey
    data
    text
    <p>I am trying to do a <code>getString</code> on a <code>ResultSet</code> from a OCCI Oracle query but I always get the <code>_BLOCK_TYPE_IS_VALID(pHead-&gt;nBlockUse)</code> assertion. My project is Multi-Threaded Debug and I have tried to set it to Single-Thread Debug, as I found suggested online, but that makes no difference. </p> <p>I'm a bit at a loss what is causing this assertion to occur. Can someone help?</p> <p>It seems I only have it with the <code>getString()</code> function, not with any other.</p> <pre><code> oracle::occi::Environment* environment; oracle::occi::Connection* con; oracle::occi::Statement* stmt; oracle::occi::ResultSet* res; try{ environment = oracle::occi::Environment::createEnvironment(oracle::occi::Environment::DEFAULT); con = environment-&gt;createConnection("db", "pssw", "DATABASE"); std::cout &lt;&lt; "created connection" &lt;&lt; std::endl; std::stringstream query; query &lt;&lt; "SELECT MOD_KEY, MOD_SCRIPTLANGUAGE, MOD_SOURCE, MOD_CODE, MOD_STYLE, MOD_TYPE "; query &lt;&lt; "FROM DB.MEDICAL_OBS_DEF "; query &lt;&lt; "WHERE MOD_KEY = 735"; stmt = con-&gt;createStatement(query.str()); res = stmt-&gt;executeQuery(); res-&gt;setMaxColumnSize(3,100); std::cout &lt;&lt; "executed query" &lt;&lt; std::endl; std::string mystring; while (res-&gt;next()) { /*mystring = */res-&gt;getString(3); ///_BLOCK_TYPE_IS_VALID(pHead-&gt;nBlockUse) Assert! } std::cout &lt;&lt; "printed resultset" &lt;&lt; std::endl; stmt-&gt;closeResultSet(res); con-&gt;terminateStatement(stmt); environment-&gt;terminateConnection(con); }catch(oracle::occi::SQLException &amp;e){ std::cout&lt;&lt;e.what(); } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload