Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Folder Error 1

Status
Not open for further replies.

lespaul

Programmer
Joined
Feb 4, 2002
Messages
7,083
Location
US
Pascal,

A while back we had this post thread245-1107222 and suddenly the code that you provided which has been working fine starting giving this error message when it reaches the bold line:

Code:
Sub EmptyAdminFolder
 Dim session As New NotesSession
 Dim db As NotesDatabase
 Dim folder As NotesView
 Dim collection As NotesDocumentCollection
 Dim doc as notesdocument
 
 Set db = session.CurrentDatabase
 Set folder = db.GetView("AdminCollection")
 Set doc = folder.getfirstdocument
 If Not(doc Is Nothing) Then
  Set collection = db.AllDocuments
  [b]Call collection.RemoveAllFromFolder( "AdminCollection" [/b])
 End If
End Sub

Notes error: Folder is larger than supported, cannot perform operation. (AdminCollection)

Any ideas why this just broke?

me
 
Why don't you try this as an alternative:

Dim vecollection as NotesViewEntryCollection
...
...
If Not(doc Is Nothing) Then
Set vecollection = folder.AllEntries
Call vecollection.RemoveAllFromFolder( "AdminCollection" )
End If

The entry 'set collection = db.AllDocuments' can be a bit big for a db with a lot of docs, and based on the code you want to remove the content only from the specified folder, right?

Brgds,

TrooDOS
 
worked like a charm! Thanks!

Leslie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top