<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic [RESOLVED] GDB in Oracle: Error calling SDE.St_GeomFromWKB from OCI in Developers Questions</title>
    <link>https://community.esri.com/t5/developers-questions/resolved-gdb-in-oracle-error-calling-sde-st/m-p/193471#M1186</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="color: #008000; margin: 0px !important;"&gt;-- The anonymous sql-block with St_GeomFromWKB is working good
&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; margin: 0px !important;"&gt;DECLARE
&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; :GEOM BLOB; 
&lt;SPAN style="color: #0000ff; margin: 0px !important;"&gt;BEGIN&lt;/SPAN&gt;&amp;nbsp; 
:GEOM := &lt;SPAN style="color: #800080; margin: 0px !important;"&gt;HEXTORAW&lt;/SPAN&gt;(&lt;SPAN style="color: #ff0000; margin: 0px !important;"&gt;'010200000004000000b6f3fdd497961341c74b37097b2042418941606596961341819543bb822042416f1283c05f971341ac1c5a149d20424175931884829613410ad7a350b6204241'&lt;/SPAN&gt;);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&lt;SPAN style="color: #0000ff; margin: 0px !important;"&gt;UPDATE&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000; margin: 0px !important;"&gt;"SDE"&lt;/SPAN&gt;.&lt;SPAN style="color: #ff0000; margin: 0px !important;"&gt;"MYTABLE"&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff; margin: 0px !important;"&gt;SET&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000; margin: 0px !important;"&gt;"SHAPE"&lt;/SPAN&gt; = SDE.ST_GeomFromWKB(:GEOM, &lt;SPAN style="color: #00008b; margin: 0px !important;"&gt;3405&lt;/SPAN&gt;) 
&lt;SPAN style="color: #0000ff; margin: 0px !important;"&gt;WHERE&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000; margin: 0px !important;"&gt;"OBJECTID"&lt;/SPAN&gt; = &lt;SPAN style="color: #00008b; margin: 0px !important;"&gt;1&lt;/SPAN&gt;;
&lt;SPAN style="color: #0000ff; margin: 0px !important;"&gt;END&lt;/SPAN&gt;;
&lt;SPAN style="color: #0000ff; margin: 0px !important;"&gt;SELECT&lt;/SPAN&gt; SDE.St_AsText(SHAPE) &lt;SPAN style="color: #0000ff; margin: 0px !important;"&gt;AS&lt;/SPAN&gt; SHAPE &lt;SPAN style="color: #0000ff; margin: 0px !important;"&gt;FROM&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000; margin: 0px !important;"&gt;"SDE"&lt;/SPAN&gt;.&lt;SPAN style="color: #ff0000; margin: 0px !important;"&gt;"MYTABLE"&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff; margin: 0px !important;"&gt;WHERE&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000; margin: 0px !important;"&gt;"OBJECTID"&lt;/SPAN&gt; = &lt;SPAN style="color: #00008b; margin: 0px !important;"&gt;1&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;This SQL is executed in Oracle SQL Developer with good result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When my application called this function I'm got the error (using OCI):&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;SPAN style="color: #222222; background-color: #efefff; font-size: 11px;"&gt;ORA-03001: unimplemented feature&lt;/SPAN&gt;&lt;BR style="color: #222222; background-color: #efefff; font-size: 11px;" /&gt;&lt;SPAN style="color: #222222; background-color: #efefff; font-size: 11px;"&gt;ORA-06512: at "SDE.ST_GEOMETRY_SHAPELIB_PKG", line 237&lt;/SPAN&gt;&lt;BR style="color: #222222; background-color: #efefff; font-size: 11px;" /&gt;&lt;SPAN style="color: #222222; background-color: #efefff; font-size: 11px;"&gt;ORA-06512: at "SDE.ST_GEOMETRY_OPERATORS", line 162&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The BLOB value which application send as WKB is properly.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm check it several methods:&lt;/P&gt;&lt;P&gt;- used it as parameter for constructor of SDO_GEOMETRY;&lt;/P&gt;&lt;P&gt;- add the blob field to&amp;nbsp;the table and save BLOB in this field, then convert this value to St_Geometry.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The convertion from BLOB field with WKB value to the&amp;nbsp;&lt;SPAN&gt;St_Geometry also propertly works in&amp;nbsp;Oracle SQL Developer only.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="color: #0000ff; margin: 0px !important;"&gt;UPDATE&lt;/SPAN&gt; "SDE"&lt;SPAN style="color: #808080; margin: 0px !important;"&gt;.&lt;/SPAN&gt;"MYTABLE" &lt;SPAN style="color: #0000ff; margin: 0px !important;"&gt;SET&lt;/SPAN&gt; "SHAPE" = SDE&lt;SPAN style="color: #808080; margin: 0px !important;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #000000; margin: 0px !important;"&gt;ST_GeomFromWKB&lt;/SPAN&gt;&lt;SPAN style="color: #808080; margin: 0px !important;"&gt;(&lt;/SPAN&gt;"SHAPE_BLOB"&lt;SPAN style="color: #808080; margin: 0px !important;"&gt;,&lt;/SPAN&gt; 3405&lt;SPAN style="color: #808080; margin: 0px !important;"&gt;)&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff; margin: 0px !important;"&gt;WHERE&lt;/SPAN&gt; "OBJECT"=1&lt;SPAN style="color: #808080; margin: 0px !important;"&gt;;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;The execution this command from my external application using OCI is finished with such error:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;SPAN style="color: #222222; background-color: #efefff; font-size: 11px;"&gt;ORA-03001: unimplemented feature&lt;/SPAN&gt;&lt;BR style="color: #222222; background-color: #efefff; font-size: 11px;" /&gt;&lt;SPAN style="color: #222222; background-color: #efefff; font-size: 11px;"&gt;ORA-06512: at "SDE.ST_GEOMETRY_SHAPELIB_PKG", line 237&lt;/SPAN&gt;&lt;BR style="color: #222222; background-color: #efefff; font-size: 11px;" /&gt;&lt;SPAN style="color: #222222; background-color: #efefff; font-size: 11px;"&gt;ORA-06512: at "SDE.ST_GEOMETRY_OPERATORS", line 162&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The message&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #222222; background-color: #efefff;"&gt;ORA-06512: at "SDE.ST_GEOMETRY_SHAPELIB_PKG", line 237&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;is meaning that error while call the funlction&amp;nbsp;geomfromshape() from library&amp;nbsp;"st_shapelib.dll"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Some others functions from "st_shapelib.dll" are successful calling from my application using OCI.&lt;BR /&gt;For example the function SDE.ST_AsBinary which calling from OCI application is works properly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Why&amp;nbsp;SDE.St_GeomFromWKB not working when its calling from OCI application?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Thanks for any ideas!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PS. Additional information.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The library st_shapelib.dll is added to Oracle Database propertly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;SELECT * FROM USER_LIBRARIES;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;return&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;ST_SHAPELIB&lt;SPAN&gt;&amp;nbsp;|&amp;nbsp;&lt;/SPAN&gt;c:\app\panuser\product\11.2.0\dbhome_1\BIN\st_shapelib.dll&lt;SPAN&gt;&amp;nbsp;|&amp;nbsp;&lt;/SPAN&gt;Y&lt;SPAN&gt;&amp;nbsp;|&amp;nbsp;&lt;/SPAN&gt;VALID&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Checking "invalid" objects&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;select object_name, object_type from user_objects where status = 'INVALID'&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;returns no records.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 09:42:21 GMT</pubDate>
    <dc:creator>DenisVitsko</dc:creator>
    <dc:date>2021-12-11T09:42:21Z</dc:date>
    <item>
      <title>[RESOLVED] GDB in Oracle: Error calling SDE.St_GeomFromWKB from OCI</title>
      <link>https://community.esri.com/t5/developers-questions/resolved-gdb-in-oracle-error-calling-sde-st/m-p/193471#M1186</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="color: #008000; margin: 0px !important;"&gt;-- The anonymous sql-block with St_GeomFromWKB is working good
&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; margin: 0px !important;"&gt;DECLARE
&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; :GEOM BLOB; 
&lt;SPAN style="color: #0000ff; margin: 0px !important;"&gt;BEGIN&lt;/SPAN&gt;&amp;nbsp; 
:GEOM := &lt;SPAN style="color: #800080; margin: 0px !important;"&gt;HEXTORAW&lt;/SPAN&gt;(&lt;SPAN style="color: #ff0000; margin: 0px !important;"&gt;'010200000004000000b6f3fdd497961341c74b37097b2042418941606596961341819543bb822042416f1283c05f971341ac1c5a149d20424175931884829613410ad7a350b6204241'&lt;/SPAN&gt;);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&lt;SPAN style="color: #0000ff; margin: 0px !important;"&gt;UPDATE&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000; margin: 0px !important;"&gt;"SDE"&lt;/SPAN&gt;.&lt;SPAN style="color: #ff0000; margin: 0px !important;"&gt;"MYTABLE"&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff; margin: 0px !important;"&gt;SET&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000; margin: 0px !important;"&gt;"SHAPE"&lt;/SPAN&gt; = SDE.ST_GeomFromWKB(:GEOM, &lt;SPAN style="color: #00008b; margin: 0px !important;"&gt;3405&lt;/SPAN&gt;) 
&lt;SPAN style="color: #0000ff; margin: 0px !important;"&gt;WHERE&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000; margin: 0px !important;"&gt;"OBJECTID"&lt;/SPAN&gt; = &lt;SPAN style="color: #00008b; margin: 0px !important;"&gt;1&lt;/SPAN&gt;;
&lt;SPAN style="color: #0000ff; margin: 0px !important;"&gt;END&lt;/SPAN&gt;;
&lt;SPAN style="color: #0000ff; margin: 0px !important;"&gt;SELECT&lt;/SPAN&gt; SDE.St_AsText(SHAPE) &lt;SPAN style="color: #0000ff; margin: 0px !important;"&gt;AS&lt;/SPAN&gt; SHAPE &lt;SPAN style="color: #0000ff; margin: 0px !important;"&gt;FROM&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000; margin: 0px !important;"&gt;"SDE"&lt;/SPAN&gt;.&lt;SPAN style="color: #ff0000; margin: 0px !important;"&gt;"MYTABLE"&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff; margin: 0px !important;"&gt;WHERE&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000; margin: 0px !important;"&gt;"OBJECTID"&lt;/SPAN&gt; = &lt;SPAN style="color: #00008b; margin: 0px !important;"&gt;1&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;This SQL is executed in Oracle SQL Developer with good result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When my application called this function I'm got the error (using OCI):&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;SPAN style="color: #222222; background-color: #efefff; font-size: 11px;"&gt;ORA-03001: unimplemented feature&lt;/SPAN&gt;&lt;BR style="color: #222222; background-color: #efefff; font-size: 11px;" /&gt;&lt;SPAN style="color: #222222; background-color: #efefff; font-size: 11px;"&gt;ORA-06512: at "SDE.ST_GEOMETRY_SHAPELIB_PKG", line 237&lt;/SPAN&gt;&lt;BR style="color: #222222; background-color: #efefff; font-size: 11px;" /&gt;&lt;SPAN style="color: #222222; background-color: #efefff; font-size: 11px;"&gt;ORA-06512: at "SDE.ST_GEOMETRY_OPERATORS", line 162&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The BLOB value which application send as WKB is properly.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm check it several methods:&lt;/P&gt;&lt;P&gt;- used it as parameter for constructor of SDO_GEOMETRY;&lt;/P&gt;&lt;P&gt;- add the blob field to&amp;nbsp;the table and save BLOB in this field, then convert this value to St_Geometry.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The convertion from BLOB field with WKB value to the&amp;nbsp;&lt;SPAN&gt;St_Geometry also propertly works in&amp;nbsp;Oracle SQL Developer only.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="color: #0000ff; margin: 0px !important;"&gt;UPDATE&lt;/SPAN&gt; "SDE"&lt;SPAN style="color: #808080; margin: 0px !important;"&gt;.&lt;/SPAN&gt;"MYTABLE" &lt;SPAN style="color: #0000ff; margin: 0px !important;"&gt;SET&lt;/SPAN&gt; "SHAPE" = SDE&lt;SPAN style="color: #808080; margin: 0px !important;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #000000; margin: 0px !important;"&gt;ST_GeomFromWKB&lt;/SPAN&gt;&lt;SPAN style="color: #808080; margin: 0px !important;"&gt;(&lt;/SPAN&gt;"SHAPE_BLOB"&lt;SPAN style="color: #808080; margin: 0px !important;"&gt;,&lt;/SPAN&gt; 3405&lt;SPAN style="color: #808080; margin: 0px !important;"&gt;)&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff; margin: 0px !important;"&gt;WHERE&lt;/SPAN&gt; "OBJECT"=1&lt;SPAN style="color: #808080; margin: 0px !important;"&gt;;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;The execution this command from my external application using OCI is finished with such error:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;SPAN style="color: #222222; background-color: #efefff; font-size: 11px;"&gt;ORA-03001: unimplemented feature&lt;/SPAN&gt;&lt;BR style="color: #222222; background-color: #efefff; font-size: 11px;" /&gt;&lt;SPAN style="color: #222222; background-color: #efefff; font-size: 11px;"&gt;ORA-06512: at "SDE.ST_GEOMETRY_SHAPELIB_PKG", line 237&lt;/SPAN&gt;&lt;BR style="color: #222222; background-color: #efefff; font-size: 11px;" /&gt;&lt;SPAN style="color: #222222; background-color: #efefff; font-size: 11px;"&gt;ORA-06512: at "SDE.ST_GEOMETRY_OPERATORS", line 162&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The message&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #222222; background-color: #efefff;"&gt;ORA-06512: at "SDE.ST_GEOMETRY_SHAPELIB_PKG", line 237&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;is meaning that error while call the funlction&amp;nbsp;geomfromshape() from library&amp;nbsp;"st_shapelib.dll"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Some others functions from "st_shapelib.dll" are successful calling from my application using OCI.&lt;BR /&gt;For example the function SDE.ST_AsBinary which calling from OCI application is works properly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Why&amp;nbsp;SDE.St_GeomFromWKB not working when its calling from OCI application?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Thanks for any ideas!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PS. Additional information.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The library st_shapelib.dll is added to Oracle Database propertly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;SELECT * FROM USER_LIBRARIES;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;return&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;ST_SHAPELIB&lt;SPAN&gt;&amp;nbsp;|&amp;nbsp;&lt;/SPAN&gt;c:\app\panuser\product\11.2.0\dbhome_1\BIN\st_shapelib.dll&lt;SPAN&gt;&amp;nbsp;|&amp;nbsp;&lt;/SPAN&gt;Y&lt;SPAN&gt;&amp;nbsp;|&amp;nbsp;&lt;/SPAN&gt;VALID&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Checking "invalid" objects&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;select object_name, object_type from user_objects where status = 'INVALID'&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;returns no records.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 09:42:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/resolved-gdb-in-oracle-error-calling-sde-st/m-p/193471#M1186</guid>
      <dc:creator>DenisVitsko</dc:creator>
      <dc:date>2021-12-11T09:42:21Z</dc:date>
    </item>
    <item>
      <title>Re: GDB in Oracle: Error calling SDE.St_GeomFromWKB from OCI</title>
      <link>https://community.esri.com/t5/developers-questions/resolved-gdb-in-oracle-error-calling-sde-st/m-p/193472#M1187</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;The library &lt;SPAN style="background-color: #ffffff;"&gt;st_shapelib.dll&amp;nbsp;&lt;/SPAN&gt;does not allow to use your own transaction.&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I was forced to remove from my OCI-programme this code snippet:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;// Allocate Transaction Handle&lt;/P&gt;&lt;P&gt;OCIHandleAlloc((dvoid *)pOCIEnviron, (dvoid **)&amp;amp;pOCITrans, OCI_HTYPE_TRANS, 0, 0);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// detach the transaction&lt;/P&gt;&lt;P&gt;OCITransDetach(pOCISvcCtx, pOCIError, 0);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Append transaction to service context&lt;/P&gt;&lt;P&gt;OCIAttrSet((dvoid *)pOCISvcCtx, OCI_HTYPE_SVCCTX, (dvoid *)pOCITrans, 0, OCI_ATTR_TRANS, pOCIError);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;XID gxid;&lt;/P&gt;&lt;P&gt;// global transaction id = [1000, 123, 1]&lt;/P&gt;&lt;P&gt;gxid.formatID = 1000; // format id = 1000&lt;/P&gt;&lt;P&gt;gxid.gtrid_length = 3; // gtrid = 123&lt;/P&gt;&lt;P&gt;gxid.data[0] = 1;&lt;/P&gt;&lt;P&gt;gxid.data[1] = 2;&lt;/P&gt;&lt;P&gt;gxid.data[2] = 3;&lt;/P&gt;&lt;P&gt;gxid.bqual_length = 1; // bqual = 1&lt;/P&gt;&lt;P&gt;gxid.data[3] = 1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OCIAttrSet((dvoid *)pOCITrans, OCI_HTYPE_TRANS, (dvoid *)&amp;amp;gxid, sizeof(XID), OCI_ATTR_XID, pOCIError);&lt;/P&gt;&lt;P&gt;OCIAttrSet ((dvoid *) pOCITrans, OCI_HTYPE_TRANS, (text *) MY_TRANSACTION_NAME, wcslen (MY_TRANSACTION_NAME), OCI_ATTR_TRANS_NAME, pOCIError);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Start transaction with timeout 90 sec&lt;/P&gt;&lt;P&gt;OCITransStart(pOCISvcCtx, pOCIError, 90, OCI_TRANS_NEW);&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;After that function ST_GeomFromWKB has begun to work properly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;So,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;I concluded that when you using "st_shapelib.dll" library in your OCI-application you may use OCITransStart, OCITransCommit and OCITransRollback with default transaction only and can not make your own transaction.&amp;nbsp;Otherwise some SDE functions such as St_GeomFromWKB will not work properly.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Jan 2018 15:30:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/resolved-gdb-in-oracle-error-calling-sde-st/m-p/193472#M1187</guid>
      <dc:creator>DenisVitsko</dc:creator>
      <dc:date>2018-01-18T15:30:45Z</dc:date>
    </item>
  </channel>
</rss>

