Information générale
Titre:
'name' cannot be enumerated (Error 1794)
A previously functioning vfp 5.0a app has begun failing on all code that includes FOR EACH ... NEXT loop to access a collection of objects returned from a CDO automation object. The collections are collections of folder objects or message recipients. When the program hits the FOR EACH line, the app fails with the error code 1794 :
'name' cannot be enumerated (Error 1794)
Some Example code :
loFoldersColl = loSearchFolder.Folders
IF TYPE('loFoldersColl') = 'O'" AND !ISNULL(loFoldersColl)
FOR EACH loFolder IN loFoldersColl
IF UPPER(loFolder.Name) = lcFolderName
lcFolderID = loFolder.ID
EXIT
ENDIF
NEXT && loFolder
ENDIF
In all instances, the collection is a valid object that contains member items (not an empty collection). The app works fine on 2 other PC's.
TIA for any advice
Bill Sabo
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement