Domino 9 und frühere Versionen > ND6: Entwicklung

Error 4207: Function requires a valid ADT argument

(1/3) > >>

HipSlu:
hallo,

ich habe eine frage - warum liefert mir

Set NewDoc = Doc.CopyToDatabase(ZielDB)

einen fehler anstatt dem neuen document zurück?

kommt aus folgenden zusammenhang:

Function CopyAllDocs(qserver As String, qdb As String, zpath As String, qview As String) As Integer
   On Error Goto ErrHand
   '-1 = error
   '>0 = ok
   Dim QuellDB As NotesDatabase
   Dim QuellView As NotesView
   Dim ZielDB As NotesDatabase
   Dim Session As New NotesSession
   Dim vc As NotesViewEntryCollection
   Dim entry As NotesViewEntry   
   Dim Doc As NotesDocument
   Dim NewDoc As NotesDocument   
   Dim f As Long
   Dim ActDB As Integer
   
   
   CopyAllDocs = -1
   Set QuellDB = Session.GetDatabase(qserver, qdb, False )   
   QuellDB.FolderReferencesEnabled = True
   Set QuellView = QuellDB.GetView(qView)
   Set vc = quellview.AllEntries
   Set entry = vc.GetFirstEntry()
   Set Doc = entry.Document
   
   ActDB = 0
   Set ZielDB = Session.GetDatabase(qserver,Cstr(ActDB)+"_"+qdb, False)
   
   For f = 1 To vc.Count
      If f = DBSchnittmarken(ActDB) Then
         Call WriteLog("Wechsle zu Ziel-DB Nr: " & Cstr(ActDB), Info)
         Print "Wechsle zu Ziel-DB Nr: " & Cstr(ActDB)
         ActDB = ActDB + 1
         Set ZielDB = Session.GetDatabase(qserver,Cstr(ActDB)+"_"+qdb, False)
      End If      
      
      Set entry = vc.GetNthEntry(f)
      Set Doc = entry.Document
      Set NewDoc = Doc.CopyToDatabase(ZielDB)
      
      Forall ActFolder In doc.FolderReferences
         Call NewDoc.PutInFolder(ActFolder,True)         
      End Forall
      
   Next
   
   
   
   CopyAllDocs=1
   
   Exit Function
   
ErrHand:   
   Call ErrHandSub()
   Resume Next
End Function

koehlerbv:
Liefert denn
Set Doc = entry.Document
noch ein NotesDocument zurück ? Die Fehlermeldung weist darauf hin, dass da nix mehr zu holen war (gleiches kommt ja zum Bleistift auch, wenn man ein
Call doc.Remove mit anschliessendem
Set doc = view.getNextDocument (doc)
macht.

Bernhard

HipSlu:
ja - ausser der debugger hat mich belogen  ;D

animate:
ich vermute, dass mit der ZielDB was nicht stimmt.
steckt das was drin?

HipSlu:

--- Zitat von: Thomas Völk am 21.06.04 - 18:22:30 ---ich vermute, dass mit der ZielDB was nicht stimmt.

--- Ende Zitat ---

hm, glaub ich weniger; ich bin dabei ein script zu basteln, welches eine mail-db in x cd-taugliche happen zerteilt - siehe
http://www.atnotes.de/index.php?board=3;action=display;threadid=16167;start=0

d.h. die zieldbs sind neue leere kopien; ich denke mal, die sind ok


--- Zitat von: Thomas Völk am 21.06.04 - 18:22:30 ---steckt das was drin?

--- Ende Zitat ---
?

Navigation

[0] Themen-Index

[#] Nächste Seite

Zur normalen Ansicht wechseln