My client uses Document Exchange as a secure document repository for a number of independent (isolated) users. Lately, one user reported using the DMX search feature and came up with a file from another user that we could not find anywhere in the file tree. We traced it down to a file that was "orphaned" in the DMX_Entries table. It had a CollectionId of 1359, but there is no row with an EntryId of 1359 in the table. The file had View permission for "All User", so that's why it could be seen. But with no valid CollectionId, it could not be shown (or found) in the tree. Is there a known problem orphaning files and a way to find and eliminate them? Is this a valid query to find all orphaned files and folders? SELECT * FROM DMX_Entries AS A WHERE NOT EXISTS (SELECT 1 FROM DMX_Entries AS B WHERE A.CollectionId = B.EntryId AND A.PortalId = B.PortalId AND B.EntryType='Collection') When we do this query on our database, we come up with 5 orphaned files and 203 folders. Thanks for your help and guidance with this. |