Hallo und schoennen guten Morgen,
Ich habe hier eine Funktion die funktioniert ohne diesen Teil
wenn ich das aber eifuege kriege ichj die message :
Zitaterror Message: Error: Field Count mismatch, connector 'file', Method Fetch
Ohne die Zeile oben geht es super. Ich hab alles versucht aber ich schaffe es nicht. Ich hoffe ihr koent mir helfen
Code
Function lsx(uidoc As NotesDocument, db As NotesDatabase, ps As String) As Integer
Dim lotID As New LCField(LCTYPE_TEXT)
Dim eng As New LCField(LCTYPE_TEXT)
Dim fAt As Variant
Dim flNotes As New LCFieldList
Dim flFiles As New LCFieldList
Dim key As New LCFieldList
Dim arr As Variant
Dim decsdb As New DECSDatabase(db.server, "decsadm.nsf")
Dim lcconDest As LCConnection
Set lcconDest = decsdb.GetConnection(|ODBC redah (using "redah")|)
lcconDest.MapByName = True
lcconDest.Metadata = "file"
lcconDest.Connect
Dim flDest As New LCFieldList
Dim trg As New LCConnection("file")
trg.Database = "/"
trg.Metadata="home/domino/TEMP/"
trg.binary=True
trg.Connect
Set flFiles = New LCFieldlist
%REM
Forall fieldname In flFiles.Names
If text = "" Then text = fieldname Else text = text + ", " + fieldname
End Forall
Messagebox "The field list is: " & text
%ENDREM
lotID.Value= Cstr(ps)
eng.Value="C"
Set fAt = uidoc.GetFirstItem("dokumenti")
If fAt.Type=RICHTEXT Then
If Not Isempty(fAt.EmbeddedObjects) Then
Forall o In fAt.EmbeddedObjects
If o.Type= EMBED_ATTACHMENT Then
Call o.ExtractFile ( "TEMP/" & o.name)
Call uidoc.Save( True, True )
End If
End Forall
End If
End If
Call trg.Select(Nothing, 1, flFiles )
Do While trg.Fetch(flFiles)
Call flFiles.IncludeField(1, lotID, "lotID")
Call flFiles.IncludeField(1, eng, "eng")
Call flDest.MapName(flFiles,"Contents,Filename,lotID,eng","file,name,lotID,eng")
Call lcconDest.Insert(flDest)
Call flFiles.Remove(1)
Loop
trg.Action LCACTION_TRUNCATE ' delete the extracted Notes attachments
'Prekid LC Veza
trg.Disconnect
lcconDest.Disconnect
lsx = 1
End Function
Alles anzeigen
EDIT
Und natuerlich entferne ich auch das eng aus
flDest.MapName(flFiles,"Contents,Filename,lotID,eng","file,name,lotID,eng")