<?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 Unlocking a FeatureClass after edits in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/unlocking-a-featureclass-after-edits/m-p/679958#M18260</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello everyone,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm trying to see if it's possible to unlock my FeatureClass after I added some features or modified some.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here's some of the main lines : &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;IFeatureBuffer featureBuffer = infosXML.FeatureclassSitesReference.CreateFeatureBuffer(); IFeatureCursor cursorReferenceInsert = infosXML.FeatureclassSitesReference.Insert(true); featureBuffer.Shape = siteCourant.ShapeCopy; cursorReferenceInsert.InsertFeature(featureBuffer); cursorReferenceInsert.Flush();&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Right now after doing this code, it locks the table from the others users.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;EDIT :: It seems to be locked only when adding new features by either the way with FeatureBuffer + FeatureCursor or with FeatureClass.createFeature()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;When modifying existing features and storing the changes, it doesn't lock the table.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 12 Jun 2012 13:32:47 GMT</pubDate>
    <dc:creator>SachaTousignant</dc:creator>
    <dc:date>2012-06-12T13:32:47Z</dc:date>
    <item>
      <title>Unlocking a FeatureClass after edits</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/unlocking-a-featureclass-after-edits/m-p/679958#M18260</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello everyone,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm trying to see if it's possible to unlock my FeatureClass after I added some features or modified some.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here's some of the main lines : &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;IFeatureBuffer featureBuffer = infosXML.FeatureclassSitesReference.CreateFeatureBuffer(); IFeatureCursor cursorReferenceInsert = infosXML.FeatureclassSitesReference.Insert(true); featureBuffer.Shape = siteCourant.ShapeCopy; cursorReferenceInsert.InsertFeature(featureBuffer); cursorReferenceInsert.Flush();&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Right now after doing this code, it locks the table from the others users.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;EDIT :: It seems to be locked only when adding new features by either the way with FeatureBuffer + FeatureCursor or with FeatureClass.createFeature()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;When modifying existing features and storing the changes, it doesn't lock the table.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jun 2012 13:32:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/unlocking-a-featureclass-after-edits/m-p/679958#M18260</guid>
      <dc:creator>SachaTousignant</dc:creator>
      <dc:date>2012-06-12T13:32:47Z</dc:date>
    </item>
    <item>
      <title>Re: Unlocking a FeatureClass after edits</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/unlocking-a-featureclass-after-edits/m-p/679959#M18261</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;try releasing &lt;P align="left"&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #444444; font-family: Courier New;"&gt;featureBuffer and &lt;/SPAN&gt;&lt;SPAN style="color: #444444; font-family: Courier New;"&gt;cursorReferenceInsert objects&lt;BR /&gt;e.g. in .Net, we can write Marshal.ReleaseComObject(&lt;/SPAN&gt;&lt;SPAN style="color: #444444; font-family: Courier New;"&gt;cursorReferenceInsert)&lt;/SPAN&gt;&lt;SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jun 2012 14:28:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/unlocking-a-featureclass-after-edits/m-p/679959#M18261</guid>
      <dc:creator>ThavitinaiduGulivindala</dc:creator>
      <dc:date>2012-06-12T14:28:54Z</dc:date>
    </item>
    <item>
      <title>Re: Unlocking a FeatureClass after edits</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/unlocking-a-featureclass-after-edits/m-p/679960#M18262</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;try releasing &lt;P align="left"&gt;&lt;SPAN style="color: #444444; font-family: Courier New;"&gt;featureBuffer and &lt;/SPAN&gt;&lt;SPAN style="color: #444444; font-family: Courier New;"&gt;cursorReferenceInsert objects&lt;BR /&gt;e.g. in .Net, we can write Marshal.ReleaseComObject(&lt;/SPAN&gt;&lt;SPAN style="color: #444444; font-family: Courier New;"&gt;cursorReferenceInsert)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Tyvm, I didn't know about it, I'll def try it out.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Worked out, thx alot! +1&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jun 2012 11:22:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/unlocking-a-featureclass-after-edits/m-p/679960#M18262</guid>
      <dc:creator>SachaTousignant</dc:creator>
      <dc:date>2012-06-13T11:22:28Z</dc:date>
    </item>
    <item>
      <title>Re: Unlocking a FeatureClass after edits</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/unlocking-a-featureclass-after-edits/m-p/679961#M18263</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Another way to release cursors is using the USING statement and ComReleaser. See the VB code below&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&lt;SPAN style="color:#008000;"&gt;' For ArcGIS 10 using VS 2010 you need to import the following
&lt;/SPAN&gt;Imports ESRI.ArcGIS.ADF.Connection.Local
Imports ESRI.ArcGIS.ADF 
&lt;SPAN style="color:#000080;"&gt;Dim&lt;/SPAN&gt; pQueryFilter &lt;SPAN style="color:#000080;"&gt;As&lt;/SPAN&gt; IQueryFilter 
pQueryFilter= &lt;SPAN style="color:#000080;"&gt;New&lt;/SPAN&gt; QueryFilterClass
pQueryFilter.WhereClause = &lt;SPAN style="color:#800000;"&gt;"ID = 1"&lt;/SPAN&gt;
Using releaser &lt;SPAN style="color:#000080;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color:#000080;"&gt;New&lt;/SPAN&gt; ComReleaser 
&lt;SPAN style="color:#000080;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim&lt;/SPAN&gt; pFeatureCursor &lt;SPAN style="color:#000080;"&gt;As&lt;/SPAN&gt; IFeatureCursor 
&amp;nbsp;&amp;nbsp;&amp;nbsp; pFeatureCursor = pFeatureclass.Update(pQueryFilter, &lt;SPAN style="color:#000080;"&gt;True&lt;/SPAN&gt;) 
&amp;nbsp;&amp;nbsp;&amp;nbsp; releaser.ManageLifetime(pFeatureCursor) 
&lt;SPAN style="color:#000080;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim&lt;/SPAN&gt; pFeature &lt;SPAN style="color:#000080;"&gt;As&lt;/SPAN&gt; IFeature&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; pFeature = pFeatureCursor.NextFeature 
&lt;SPAN style="color:#000080;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; While&lt;/SPAN&gt; pFeature IsNot &lt;SPAN style="color:#000080;"&gt;Nothing&lt;/SPAN&gt; 
&lt;SPAN style="color:#008000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' Do something with pFeature&lt;/SPAN&gt; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pFeatureCursor.UpdateFeature(pFeature) 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pFeature = pFeatureCursor.NextFeature
&lt;SPAN style="color:#000080;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End&lt;/SPAN&gt; &lt;SPAN style="color:#000080;"&gt;While
&lt;/SPAN&gt;&lt;SPAN style="color:#000080;"&gt;End&lt;/SPAN&gt; Using
&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;Duncan&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 04:38:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/unlocking-a-featureclass-after-edits/m-p/679961#M18263</guid>
      <dc:creator>DuncanHornby</dc:creator>
      <dc:date>2021-12-12T04:38:25Z</dc:date>
    </item>
  </channel>
</rss>

