how to add fieldname as a variable in OCCI
<p>In the below C++ code, i am updating a field of emp table based on the search value. But this code is not working properly. I am getting output as aborted. </p>

<pre><code>void UpdateData(string field_name,string updated_value,string search_value)
{
  stmt-&gt;createStatement("UPDATE emp SET :1=:2 where search=:3");
  stmt-&gt;setString(1,field_name);
  stmt-&gt;setString(2,updated_value);
  stmt-&gt;setString(3,search_value);
  stmt-&gt;executeUpdate();
}
</code></pre>

<p>In my program user will select which field they have to update and the selected field name is passed into function as field_name parameter. updated_value is the new value entered by the user and search_value is the search key to find the appropriate record. </p>

<p>If i do like
      stmt->createStatement("UPDATE emp SET field_name=:2 where search=:3");</p>

<p>its working..</p>

<p>But the problem is, the field name will change according to user selection. How i can overcome this problem. Is there any other way ?</p>
