IDifferenceCursor->Next esriDifferenceTypeDeleteNoChange not detecting changes

Discussion created by cdextraze on Jan 23, 2020
Latest reply on Jan 24, 2020 by deleted-user-3c_6PfsXFEo6

I have two very similar setups and in the case of the first the following code is simply not detecting the delete operation while the second is being detected without issue.


Both geodatabases are on the same SQL Server using windows user authentication.

Both were created using the Create Enterprise Geodatabase tool in ArcMap.


The first was created using an ArcMap 10.5.1 and the second using ArcMap 10.3.1 but I have had the problem occur in other installations using version 10.2.1 on Oracle.


Both have three versions, sde.DEFAULT, sde.TEST1 and sde.TEST2.


Does anyone have any idea how to make this work consistently?



STDMETHODIMP CADWorkspaceExtension::OnPost(BSTR targetVersionName)//sde.DEFAULT
 CString csName = CTools::GetTableNameFromClass(ipFeatureClass);
 IFeatureClassPtr ipFeatureClassCompare;

//ipFeatureWorkspaceParent =
sde.DEFAULT in both cases
 ipFeatureWorkspaceParent->OpenFeatureClass(csName.AllocSysString(), &ipFeatureClassCompare);

 ITablePtr ipDifferenceTable(ipFeatureClassCompare);
 IVersionedTablePtr ipVersionedTable(ipFeatureClass);
  long nOID;
  IRowPtr ipRow;
  IDifferenceCursorPtr ipDifferenceCursor;
  ipVersionedTable->Differences(ipDifferenceTable, esriDifferenceTypeDeleteNoChange, 
                                NULL, &ipDifferenceCursor);
  while(SUCCEEDED(ipDifferenceCursor->Next(&nOID,&ipRow)) && nOID != -1)
    //Not Reaching here in case 1
    //Reaches here in case 2