I have noticed that after select layer by location/attribute with empty result (example, i tried select layer with attribute, which that do not have), SearchCursor do not see rows in layer table. I tried SearchCursor layer write with dataSource, it's work on *.gdb whom i have physical access, but for *.sde whom i do not have physical access it's do not work ('Cannot open file' error). If i can select all layers features, than SearchCursor will see rows. I know about arcpy.SelectLayerByAttribute, but it is slow. I work with setSelectionSet and after clear selection with setSelectionSet('new', ) is same problem. How me revive layer after select with empty result?
Please, help me and sorry for my English!
Yes, i understood and not only layer.setSelectionSet do it, but SelectLayerByAttribute/Location too. I think about how deteck damaged layer and if found than run SelectLayerByAttribute "clear_selection".