Domino 9 und frühere Versionen > Entwicklung

Agent

<< < (3/3)

HipSlu:
ist mir ja schön langsam peinlich.... aber jetzt bekomm ich bei "            Set doc2 = view2.GetDocumentByKey( keys )    " => "Too many keys"

:)

doliman:
versuchsmal mit
Set doc2 = view2.GetDocumentByKey( keys, true )

HipSlu:
leider.... gleiche Fehlermeldung

doliman:
schick mir kurz die DB
mail@doleschel.de
das geht schneller

HipSlu:
fyi - so solls sein:

Sub Initialize    
     Dim session As New NotesSession    
     Dim db As NotesDatabase    
     
     Dim view1 As NotesView    
     Dim view2 As NotesView    
     
     Dim doc1 As notesdocument    
     Dim doc2 As notesdocument    
     
     
     Set db = session.CurrentDatabase    
     Set view1 = db.GetView( "ThemaView" )    
     Set view2 = db.GetView( "(CounterView2)" )    
     Set doc1 = view1.getfirstdocument    
     
     Do While Not doc1 Is Nothing    
           iddoc1$ = doc1.UniversalID
           
           
           Set doc2 = view2.GetDocumentByKey( iddoc1$, True )
           
           If doc2 Is Nothing Then    
                 Set doc2 = New NotesDocument(db)    
                 doc2.Form = "Counter"    
                 doc2.Unid_Faq = doc1.universalid
                 doc2.N_Views = 0    
                 Call doc2.Save( True, True )
           End If    
           Set doc1=view1.getnextdocument      (doc1)
     Loop    
End Sub    

Navigation

[0] Themen-Index

[*] Vorherige Sete

Zur normalen Ansicht wechseln