Du suchst nun nach drei Stringwerten, da der Variant nur Elemente eines Datentyps erlaubt und die Zuweisung des ersten Elements (String) ein Variant vom Type String erzeugt.
Hm...
Unter R8.5.3 gibt:
Option Public
Option Declare
Option Base 1
Sub Initialize
Dim v(3) As Variant
Dim eins As String
Dim zwei As New NotesDateTime("")
Dim drei As Integer
eins = "ABC"
Call zwei.Setnow
drei = 333
v(1) = eins
v(2) = zwei.Lslocaltime
v(3) = drei
Stop
ForAll ele In v
Print ele & " - " & TypeName(ele)
End ForAll
End Sub
folgendes aus:
ABC - STRING
31.03.2014 09:44:39 - DATE
333 - INTEGER
Ich gehe davon aus, daß dies unter R9 auch so ist.
Übrigens: Die NotesHilfe schweigt sich zu Variant im KeyArray natürlich aus bzw. macht vage / interpretierbare Angaben ::) Wäre ja auch zu einfach gewesen, wenn das Thema da behandelt werden würde >:(
Set notesDocumentCollection = notesView.GetAllDocumentsByKey( keyArray [, exactMatch% ] )
Parameters
keyArray
String (variable-length only), integer, long or double value, or array of string, number, DateTime, or DateRange objects. Each element in the array is compared to a sorted column in the view. The first element in the array is compared to the first sorted column in the view; the second element is compared to the second sorted column; and so on.
Gruß,
Th.