<?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 Re: Keep the Geodatabase open? in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/keep-the-geodatabase-open/m-p/794724#M1747</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Think about this case:&lt;/P&gt;&lt;P&gt;I have a program that runs 10 GP tools one after another. Sometime I run them all, sometime I skip one or two and sometime some of them fail.&lt;/P&gt;&lt;P&gt;I would like to get 10 messages in my log table (Tool 1 success, tool 2 skip, tool 3 fail etc.)&lt;/P&gt;&lt;P&gt;I use similar code to this:&amp;nbsp;&lt;A class="link-titled" href="https://github.com/Esri/arcgis-pro-sdk/wiki/ProSnippets-Geodatabase#creating-a-row" title="https://github.com/Esri/arcgis-pro-sdk/wiki/ProSnippets-Geodatabase#creating-a-row"&gt;ProSnippets Geodatabase · Esri/arcgis-pro-sdk Wiki · GitHub&lt;/A&gt;&amp;nbsp; to write to the log table (all other examples I found is slimier). This code will open sde oracle database 10 times. This is very expensive...&lt;/P&gt;&lt;P&gt;I would like to keep the Table object open and use it again and again.&lt;/P&gt;&lt;P&gt;What is the correct way here?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 30 Jan 2019 05:30:52 GMT</pubDate>
    <dc:creator>ModyBuchbinder</dc:creator>
    <dc:date>2019-01-30T05:30:52Z</dc:date>
    <item>
      <title>Keep the Geodatabase open?</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/keep-the-geodatabase-open/m-p/794722#M1745</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a program the writing many lines to a table in enterprise geodatabase.&lt;/P&gt;&lt;P&gt;I all the geodatabase example I could find you always use&amp;nbsp;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN class="" style="color: #d73a49;"&gt;using&lt;/SPAN&gt; (&lt;SPAN class="" style="color: #6f42c1;"&gt;Geodatabase&lt;/SPAN&gt; &lt;SPAN class="" style="color: #24292e;"&gt;geodatabase&lt;/SPAN&gt; &lt;SPAN class="" style="color: #d73a49;"&gt;=&lt;/SPAN&gt; &lt;SPAN class="" style="color: #d73a49;"&gt;new&lt;/SPAN&gt; &lt;SPAN class="" style="color: #6f42c1;"&gt;Geodatabase...
&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;This will reopen the enterprise geodatabse for each single line I write to the log.&lt;/P&gt;&lt;P&gt;Is this the correct way to do it?&lt;/P&gt;&lt;P&gt;Can I keep the Geodatabse open?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 09:09:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/keep-the-geodatabase-open/m-p/794722#M1745</guid>
      <dc:creator>ModyBuchbinder</dc:creator>
      <dc:date>2021-12-12T09:09:56Z</dc:date>
    </item>
    <item>
      <title>Re: Keep the Geodatabase open?</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/keep-the-geodatabase-open/m-p/794723#M1746</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's hard to visualize without code, but I assume you are writing out rows to a&amp;nbsp;geodatabase in some kind of loop, right? &amp;nbsp;If so, just open the&amp;nbsp;geodatabase outside of the loop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Jan 2019 15:25:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/keep-the-geodatabase-open/m-p/794723#M1746</guid>
      <dc:creator>RichRuh</dc:creator>
      <dc:date>2019-01-29T15:25:13Z</dc:date>
    </item>
    <item>
      <title>Re: Keep the Geodatabase open?</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/keep-the-geodatabase-open/m-p/794724#M1747</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Think about this case:&lt;/P&gt;&lt;P&gt;I have a program that runs 10 GP tools one after another. Sometime I run them all, sometime I skip one or two and sometime some of them fail.&lt;/P&gt;&lt;P&gt;I would like to get 10 messages in my log table (Tool 1 success, tool 2 skip, tool 3 fail etc.)&lt;/P&gt;&lt;P&gt;I use similar code to this:&amp;nbsp;&lt;A class="link-titled" href="https://github.com/Esri/arcgis-pro-sdk/wiki/ProSnippets-Geodatabase#creating-a-row" title="https://github.com/Esri/arcgis-pro-sdk/wiki/ProSnippets-Geodatabase#creating-a-row"&gt;ProSnippets Geodatabase · Esri/arcgis-pro-sdk Wiki · GitHub&lt;/A&gt;&amp;nbsp; to write to the log table (all other examples I found is slimier). This code will open sde oracle database 10 times. This is very expensive...&lt;/P&gt;&lt;P&gt;I would like to keep the Table object open and use it again and again.&lt;/P&gt;&lt;P&gt;What is the correct way here?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jan 2019 05:30:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/keep-the-geodatabase-open/m-p/794724#M1747</guid>
      <dc:creator>ModyBuchbinder</dc:creator>
      <dc:date>2019-01-30T05:30:52Z</dc:date>
    </item>
    <item>
      <title>Re: Keep the Geodatabase open?</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/keep-the-geodatabase-open/m-p/794725#M1748</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mody,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The easiest way would be to add the table to the table of contents in the map and access it from there. &amp;nbsp;This will keep it open.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another way to do this would be to create a class like the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;class&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;MyLogger&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; IDisposable &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
 
  &lt;SPAN class="keyword token"&gt;private&lt;/SPAN&gt; Table _logTable &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;null&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;//instance variable – pins the table when assigned to prevent it going out of scope&lt;/SPAN&gt;
 
  &lt;SPAN class="comment token"&gt;// Initialize the logger object&lt;/SPAN&gt;
  &lt;SPAN class="keyword token"&gt;internal&lt;/SPAN&gt; Task &lt;SPAN class="token function"&gt;InitializeAsync&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
    QueuedTask&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Run&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
      &lt;SPAN class="token function"&gt;Using&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; gdb &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;Geodatabase&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
        &lt;SPAN class="comment token"&gt;//assign it&lt;/SPAN&gt;
        _logTable &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; gdb&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;OpenDataset&lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;Table&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;…&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
      &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
    &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
  &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
 
  &lt;SPAN class="comment token"&gt;//use it&lt;/SPAN&gt;
  Internal Task&lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;bool&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;LogAsync&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;string&lt;/SPAN&gt; message&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; 
  &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
 
    &lt;SPAN class="comment token"&gt;//declare on the UI is ok&lt;/SPAN&gt;
    Var editop &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;EditOperation&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt; …&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;
      &lt;SPAN class="comment token"&gt;//will be called on the QueuedTaskRun&lt;/SPAN&gt;
      editOp&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Callback&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt; context &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
      &lt;SPAN class="comment token"&gt;//do your thing…using the instance member&lt;/SPAN&gt;
      &lt;SPAN class="token function"&gt;Using&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; rb &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;_logTable&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;CreateRowBuffer&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;

      &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
    &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; _logTable&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
 
    &lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt; editOp&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;ExecuteAsync&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
  &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
 
  &lt;SPAN class="comment token"&gt;//clean up&lt;/SPAN&gt;
  Private &lt;SPAN class="keyword token"&gt;void&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;Dispose&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
    _logTable&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Dispose&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
    _logTable &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;null&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
  &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
 &lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;I hope this helps,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--Rich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 09:09:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/keep-the-geodatabase-open/m-p/794725#M1748</guid>
      <dc:creator>RichRuh</dc:creator>
      <dc:date>2021-12-12T09:09:59Z</dc:date>
    </item>
  </channel>
</rss>

