<?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 Close SDE connection in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/close-sde-connection/m-p/674437#M18066</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Kirk,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Yes I saw your previous postings. I'm still at 9.2 unfortunately. My function is run through ArcMap for the benefit of my users, but there are no layers in the TOC. I only use featureclasses which i'm grabbing from my SDE geodatabase.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can anyone confirm whether they've successfully closed a connection to an SDE workspace previously? if so, how? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 20 Apr 2010 15:52:10 GMT</pubDate>
    <dc:creator>deleted-user-VeZur_n9o0OZ</dc:creator>
    <dc:date>2010-04-20T15:52:10Z</dc:date>
    <item>
      <title>Close SDE connection</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/close-sde-connection/m-p/674435#M18064</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a function which creates an SDE connection. My connection is immediately visible on the server using the command: sdemon -o -info -I users. However, i am unable to close the connection until ArcMap is closed. I'd like to do so, as i'm using iSchemaLockInfo to detect locks in a seperate function which may run simultaneously&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've dug through the old forums and found a few suggestions - none of which have worked. I have tried so far...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1. Setting my workspace and workspacefactory to nothing&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2. Marshal.ReleaseComObject() for the factory and workspace&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3. Using iGxRemoteConneciton.disconnect() &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So i'm out of ideas. Can anybody close my connection?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also - my connections never close if i run my code in debug mode. Is that normal? At the moment i'm killing them each time&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Finally - my second function edits a coded value domain (empties it, re-populates it). As domains are stored at the workspace level, i figured i should check for connections to the workspace before doing anything. Is this necessary? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks to all,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;James&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am opening a SDE feature workspace as follows...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;'Connect to workspace&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Dim workspacefactory As IWorkspaceFactory = New SdeWorkspaceFactory&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Dim featureworkspace As IFeatureWorkspace = CType(workspacefactory.Open(propertyset, 0), IFeatureWorkspace)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Apr 2010 13:33:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/close-sde-connection/m-p/674435#M18064</guid>
      <dc:creator>deleted-user-VeZur_n9o0OZ</dc:creator>
      <dc:date>2010-04-20T13:33:49Z</dc:date>
    </item>
    <item>
      <title>Close SDE connection</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/close-sde-connection/m-p/674436#M18065</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm also curious about this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried IDataLayer2.Disconnect in 9.2 or so.&amp;nbsp; It didn't work, but maybe something has changed so might be worth trying.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Apr 2010 14:26:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/close-sde-connection/m-p/674436#M18065</guid>
      <dc:creator>KirkKuykendall</dc:creator>
      <dc:date>2010-04-20T14:26:20Z</dc:date>
    </item>
    <item>
      <title>Close SDE connection</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/close-sde-connection/m-p/674437#M18066</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Kirk,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Yes I saw your previous postings. I'm still at 9.2 unfortunately. My function is run through ArcMap for the benefit of my users, but there are no layers in the TOC. I only use featureclasses which i'm grabbing from my SDE geodatabase.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can anyone confirm whether they've successfully closed a connection to an SDE workspace previously? if so, how? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Apr 2010 15:52:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/close-sde-connection/m-p/674437#M18066</guid>
      <dc:creator>deleted-user-VeZur_n9o0OZ</dc:creator>
      <dc:date>2010-04-20T15:52:10Z</dc:date>
    </item>
    <item>
      <title>Close SDE connection</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/close-sde-connection/m-p/674438#M18067</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;what happens if you create a featurelayer with the featureclass and call IDatalayer2.Disconnect on the featureclass when you a through with it (and after calling releasecomobject on the workspace and workspacefactory)?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Apr 2010 16:42:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/close-sde-connection/m-p/674438#M18067</guid>
      <dc:creator>KirkKuykendall</dc:creator>
      <dc:date>2010-04-20T16:42:21Z</dc:date>
    </item>
    <item>
      <title>Re: Close SDE connection</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/close-sde-connection/m-p/674439#M18068</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;this is a bit of a bump.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I noticed this morning as I was working through an error that was causing my application to crash that I was left with a number of orphan SDE Connections, which led me to investigating how we should close these connections (COM Releaser is a little clunky for me).&amp;nbsp; As I've been reading, it doesn't look like anyone pays any attention to this, and the API Reference for IWorkspace or IWorkspaceFactory have no methods to Close.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Has anyone found a good work around?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Sep 2011 13:41:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/close-sde-connection/m-p/674439#M18068</guid>
      <dc:creator>LukeBadgerow</dc:creator>
      <dc:date>2011-09-28T13:41:24Z</dc:date>
    </item>
  </channel>
</rss>

