<?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: Rollback insert and delete from GDB's feature class to Oracle feature's SDE in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/rollback-insert-and-delete-from-gdb-s-feature/m-p/1405737#M11331</link>
    <description>&lt;P&gt;ArcGIS works with specific &lt;SPAN&gt;database management systems (DBMS)&lt;/SPAN&gt;&amp;nbsp;data types. Depending on the DBMS&amp;nbsp; type, a field's precision, scale, or geometry type (Geometry vs ST_Geometry) may change. Some DBMSs don't support the field types that exist in another DBMS.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;SPAN&gt;File and mobile geodatabase data types are the same as&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/help/data/geodatabases/overview/arcgis-field-data-types.htm#ESRI_SECTION1_5531C83A868B4326B597DA44C679F00B" target="_self"&gt;ArcGIS data types&lt;/A&gt;&lt;SPAN&gt;. For DBMS, ArcGIS data types map to database data types and can differ depending on the DBMS.&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/help/data/databases/dbms-data-types-supported.htm#GUID-F4F0BCDE-2AF4-4722-B430-9EB87CDBEBE3" target="_self"&gt;Here&lt;/A&gt; is the mapping table of supported field data types for each DBMS. Users should be responsible for creating a properly mapped schema before migrating data.&lt;/P&gt;&lt;P&gt;With this mapping information, could you please tell us which field values/types are not copied from one environment to another?&lt;/P&gt;</description>
    <pubDate>Thu, 04 Apr 2024 22:37:34 GMT</pubDate>
    <dc:creator>Aashis</dc:creator>
    <dc:date>2024-04-04T22:37:34Z</dc:date>
    <item>
      <title>Rollback insert and delete from GDB's feature class to Oracle feature's SDE</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/rollback-insert-and-delete-from-gdb-s-feature/m-p/1403762#M11310</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I am using the following to delete the features in target SDE:&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;EditOperation editOperation = new EditOperation();
editOperation.Callback(context =&amp;gt;
{
    ArcGIS.Core.Data.QueryFilter openCutFilter = new ArcGIS.Core.Data.QueryFilter { WhereClause = "field = 'something'" };

    using (RowCursor rowCursor = featureClass.Search(openCutFilter, false))
    {
        while (rowCursor.MoveNext())
        {
            using (Row row = rowCursor.Current)
            {
                // In order to update the Map and/or the attribute table. Has to be called before the delete.
                context.Invalidate(row);

                row.Delete();
            }
        }
    }
}, featureClass);&lt;/LI-CODE&gt;&lt;P&gt;&lt;STRONG&gt;After deleting I want to insert all the data from GDB to SDE. How to achieve this?&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Apr 2024 11:32:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/rollback-insert-and-delete-from-gdb-s-feature/m-p/1403762#M11310</guid>
      <dc:creator>SumitMishra_016</dc:creator>
      <dc:date>2024-04-01T11:32:12Z</dc:date>
    </item>
    <item>
      <title>Re: Rollback insert and delete from GDB's feature class to Oracle feature's SDE</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/rollback-insert-and-delete-from-gdb-s-feature/m-p/1405242#M11322</link>
      <description>&lt;P&gt;For data insert, have you looked into &lt;A href="https://pro.arcgis.com/en/pro-app/3.0/sdk/api-reference/topic28926.html" target="_self"&gt;the insert cursor?&lt;/A&gt;&lt;/P&gt;&lt;P&gt;For further details, please refer to &lt;A href="https://github.com/Esri/arcgis-pro-sdk/wiki/ProConcepts-Geodatabase#editing-in-add-in-mode" target="_self"&gt;the conceptual doc&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Apr 2024 15:07:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/rollback-insert-and-delete-from-gdb-s-feature/m-p/1405242#M11322</guid>
      <dc:creator>Aashis</dc:creator>
      <dc:date>2024-04-03T15:07:35Z</dc:date>
    </item>
    <item>
      <title>Re: Rollback insert and delete from GDB's feature class to Oracle feature's SDE</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/rollback-insert-and-delete-from-gdb-s-feature/m-p/1405581#M11327</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/221628"&gt;@Aashis&lt;/a&gt;&amp;nbsp; thanks for the reply,&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;EditOperation insertOperation = new EditOperation();
insertOperation.Callback(context =&amp;gt;
{
    using (Geodatabase gdb = new Geodatabase(new FileGeodatabaseConnectionPath(new Uri("source.gdb"))))
    {
        {
            // Open the source feature class

            using (Table sourceFeatureClass = gdb.OpenDataset&amp;lt;Table&amp;gt;("fcname"))
            {
                using (InsertCursor insertCursor = featureClass.CreateInsertCursor())
                {
                    // Iterate through the rows in the source feature class
                    using (RowCursor sourceCursor = sourceFeatureClass.Search())
                    {
                        while (sourceCursor.MoveNext())
                        {
                            using (Row sourceRow = sourceCursor.Current)
                            {
                                Feature feat = (Feature)sourceCursor.Current;
                                // Create a new row buffer for the target feature class
                                using (RowBuffer targetRowBuffer = featureClass.CreateRowBuffer())
                                {
                                    // Copy attribute values from the source to the target
                                    foreach (ArcGIS.Core.Data.Field sourceField in sourceFeatureClass.GetDefinition().GetFields())
                                    {
                                        string fieldName = sourceField.Name;
                                        if (featureClass.GetDefinition().GetFields().Any(f =&amp;gt; f.Name == fieldName))
                                        {
                                            // Check if the field is writable
                                            if (featureClass.GetDefinition().GetFields().First(f =&amp;gt; f.Name == fieldName).IsEditable)
                                            {
                                                // Set attribute value in the target row buffer
                                                targetRowBuffer[fieldName] = sourceRow[fieldName];
                                            }
                                            else
                                            {
                                                // Handle non-writable field (e.g., log a message or skip)
                                                Console.WriteLine($"Field '{fieldName}' is not writable.");
                                            }
                                        }
                                    }

                                    // Insert the new row into the target feature class
                                    insertCursor.Insert(targetRowBuffer);
                                }
                            }
                        }
                    }

                    // Flush the insert cursor to commit the changes
                    insertCursor.Flush();
                }
            }
        }
    }
}, featureClass);                             
                               
                                &lt;/LI-CODE&gt;&lt;P&gt;I am using the above code copy from source feature class to target but it is not inserting all fields. &lt;STRONG&gt;Can you help with inserting all fields from source to SDE?&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Apr 2024 06:21:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/rollback-insert-and-delete-from-gdb-s-feature/m-p/1405581#M11327</guid>
      <dc:creator>SumitMishra_016</dc:creator>
      <dc:date>2024-04-04T06:21:43Z</dc:date>
    </item>
    <item>
      <title>Re: Rollback insert and delete from GDB's feature class to Oracle feature's SDE</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/rollback-insert-and-delete-from-gdb-s-feature/m-p/1405737#M11331</link>
      <description>&lt;P&gt;ArcGIS works with specific &lt;SPAN&gt;database management systems (DBMS)&lt;/SPAN&gt;&amp;nbsp;data types. Depending on the DBMS&amp;nbsp; type, a field's precision, scale, or geometry type (Geometry vs ST_Geometry) may change. Some DBMSs don't support the field types that exist in another DBMS.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;SPAN&gt;File and mobile geodatabase data types are the same as&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/help/data/geodatabases/overview/arcgis-field-data-types.htm#ESRI_SECTION1_5531C83A868B4326B597DA44C679F00B" target="_self"&gt;ArcGIS data types&lt;/A&gt;&lt;SPAN&gt;. For DBMS, ArcGIS data types map to database data types and can differ depending on the DBMS.&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/help/data/databases/dbms-data-types-supported.htm#GUID-F4F0BCDE-2AF4-4722-B430-9EB87CDBEBE3" target="_self"&gt;Here&lt;/A&gt; is the mapping table of supported field data types for each DBMS. Users should be responsible for creating a properly mapped schema before migrating data.&lt;/P&gt;&lt;P&gt;With this mapping information, could you please tell us which field values/types are not copied from one environment to another?&lt;/P&gt;</description>
      <pubDate>Thu, 04 Apr 2024 22:37:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/rollback-insert-and-delete-from-gdb-s-feature/m-p/1405737#M11331</guid>
      <dc:creator>Aashis</dc:creator>
      <dc:date>2024-04-04T22:37:34Z</dc:date>
    </item>
    <item>
      <title>Re: Rollback insert and delete from GDB's feature class to Oracle feature's SDE</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/rollback-insert-and-delete-from-gdb-s-feature/m-p/1406048#M11334</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/221628"&gt;@Aashis&lt;/a&gt;&amp;nbsp;Thanks for the reply. I am to insert now by following code :&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;foreach (var sourceField in sourceFeature.GetFields())
{
    if (sourceField.Name == sourceFeatureClass.GetDefinition().GetObjectIDField())
    {
        continue;
    }
    // Find the corresponding field in the target feature class
    int targetFieldIndex = targetFeatureDefinition.FindField(sourceField.Name);

    // If the field exists in the target feature class
    if (targetFieldIndex &amp;gt;= 0)
    {
        // Get the value of the field from the source feature
        var value = sourceFeature[sourceField.Name];
        //targetRowBuffer[targetFeatureDefinition.GetShapeField()] = featureGeometry;
        // Set the value in the target row buffer
        targetRowBuffer_i[targetFieldIndex] = value;
    }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Apr 2024 20:45:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/rollback-insert-and-delete-from-gdb-s-feature/m-p/1406048#M11334</guid>
      <dc:creator>SumitMishra_016</dc:creator>
      <dc:date>2024-04-04T20:45:54Z</dc:date>
    </item>
  </channel>
</rss>

