English

Bug: Error while reading or writing logfile[]

Description

If the data is in SDE, there are over 100 features in the selection set, and another component has the stream to the logfile open for reading, ISelectionSet:RemoveList and ISelectionSet:AddList fail with the following error message:

"Error while reading or writing logfile[]".

Cause

SDE does not allow the selection set to be updated while it is being used elsewhere in the system to iterate through the features.

Workaround

One way to hold on to the selection is by doing the following:

Code:
Dim pAV as IActiveView
Dim pEnumfeature as IEnumFeature
Dim pFeature as IFeature
Set pAV = pMap
Set pEnumFeature = pAV.Selection
Set pFeature = pEnumFeature.Next

Call the following after enumerating through the features to release stream:

Code:
pEnumFeature.Reset

Related Information