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? Snippet 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); if(ipDifferenceTable)
{
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
}
}
}
... View more