Hi,<br />&nbsp;&nbsp; I am trying to use rasqal to use SPARQL1.1 queries to insert a triple into the data graph. However when I retrieve the triple using SELECT, I do not get the inserted triple. Could someone send me a sample code to insert triples into the data graph.<br /><br />The part of the code written by me to insert the triple is as follows<br /><br />
<p>&nbsp; rasqal_query *tquery;</p>
<p>&nbsp;query_string="PREFIX cim:&lt;<a href="http://iec.ch/TC57/2008/CIM-schema-cim14">http://iec.ch/TC57/2008/CIM-schema-cim14</a>#&gt; \<br />&nbsp;&nbsp;&nbsp;PREFIX rdf:&lt;<a href="http://www.w3.org/1999/02/22-rdf-syntax-ns">http://www.w3.org/1999/02/22-rdf-syntax-ns</a>#&gt; \<br />&nbsp;&nbsp;&nbsp;PREFIX base:&lt;"+ std::string((const char *)raptor_uri_as_string(uri))+"#&gt; \<br />&nbsp;&nbsp;&nbsp;INSERT DATA {base:" +name +" rdf:type cim:GeographicalRegion .}";</p>
<p>&nbsp;<br />&nbsp; tquery=rasqal_new_query(rql_world,"sparql11",NULL);<br />&nbsp; int res= rasqal_query_add_data_graph(tquery,data_graph);<br />&nbsp; rasqal_query_prepare(tquery,(const unsigned char*)query_string.c_str(),NULL);<br />&nbsp;&nbsp;results=rasqal_query_execute(tquery);<br />&nbsp;&nbsp;rasqal_free_query(tquery);&nbsp;&nbsp;</p>
<br /><br />Is it the right way to insert the triple?<br />
<div>-- <br />
<pre><span style="color: #0000ff;"><em>Thanking You,</em></span><br /><span style="color: #0000ff;"><strong><em>Shashank Bandari<br /><br /><br /><br /><br /></em></strong></span><br /><a href="mailto:shashank.bandari@ieee.org">shashank.bandari@ieee.org</a><br /></pre>
</div>