Submitted by Anže Bajde on Aug 6, 2009 8:13:19 AM

6) Profiledocument.Responses

I think the best way or the fastest is to get empty collection by Set collection = docProfile.Responses.

Submitted by Terry Boyd on Feb 4, 2009 11:34:10 PM

GetProfileDocCollection

I have found that the fastest way to create a blank collection is to use the GetProfileDocCollection method on the NotesDatabase object. You then don't even require a view object (as with GetAllDocumentsByKey).

You simply reference a profile document that doesn't exist - e.g. Set collection = thisDb.GetProfileDocCollection( "NOSUCHTHING" ).

Submitted by Esther Strom on Nov 26, 2008 3:15:42 PM

GetAllDocumentsByKey

The most commonly-used technique at my company is to just call GetAllDocumentsByKey on a view, using a key that you know will never exist (usually a combination of strange characters like "@#*"). Works like a charm.

Submitted by Karl-Henry Martinsson on Nov 26, 2008 1:19:10 PM

Lists are very powerful

You can also create a list of your own data object (classes), containing not only a NotesDocument but also other info. I am using that extensivly in my applications, makes it very powerful.

Submitted by devin olson on Nov 26, 2008 11:25:11 AM

I use the GetProfileDocCollection method

From my libTools Library:

Public Function getEmptyDocumentCollection(source As NotesDatabase) As NotesDocumentCollection

%REM This function intentionally has NO ERROR TRAPPING. Errors must be handled by the calling code.

'/**

' * Creates an empty NotesDocumentCollection from the source database.

' *

' * @param source NotesDatabase from within which to create the empty document collection.

' * @return NotesDocumentCollection containing zero documents.

' */

%END REM

Dim result As NotesDocumentCollection

Set result = source.GetProfileDocCollection("*INVALID*")

While (result.Count > 0)

Call result.DeleteDocument(result.GetFirstDocument())

Wend ' (result.Count > 0)

Set getEmptyDocumentCollection = result

End Function ' getEmptyDocumentCollection

HTH,

-Devin.

Submitted by Vince Schuurman on Nov 26, 2008 11:06:15 AM

List datatype limit

Watch out for the 'out of handle' error that could crash your server if you have to many documents in your list.

ND5 and ND7 10495, ND6 6399, Not sure about ND8.

Vince