G
Guest
i = Int(Coll.Count)
j=1
sled:
If j<i Then
Set doc = Coll.GetNthDocument(j)
x = Cstr(doc.E(0))
y= Cstr(doc.N(0))
ptipe = Cstr(doc.PointType(0))
Set doc = Coll.GetNextDocument(doc)
While Not (doc Is Nothing)
' Print i, " ",j,";"
If x = Cstr(doc.E(0)) Then
' Print "b"
If y= Cstr(doc.N(0)) Then
If ptipe = Cstr(doc.PointType(0)) Then
If ptipe = "fast" Then
Call Coll.DeleteDocument(doc)
i=i-1
' Print "a"
' Goto sled
End If
End If
End If
End If
Set doc = Coll.GetNextDocument(doc)
Wend
j=j+1
Goto sled
End If
Суть алгорима: есть коллекция документов, нужно выкинуть из нее документы совпадающие по определенным полям.
Но после удаления документа агент вылетает. Что упустил?
j=1
sled:
If j<i Then
Set doc = Coll.GetNthDocument(j)
x = Cstr(doc.E(0))
y= Cstr(doc.N(0))
ptipe = Cstr(doc.PointType(0))
Set doc = Coll.GetNextDocument(doc)
While Not (doc Is Nothing)
' Print i, " ",j,";"
If x = Cstr(doc.E(0)) Then
' Print "b"
If y= Cstr(doc.N(0)) Then
If ptipe = Cstr(doc.PointType(0)) Then
If ptipe = "fast" Then
Call Coll.DeleteDocument(doc)
i=i-1
' Print "a"
' Goto sled
End If
End If
End If
End If
Set doc = Coll.GetNextDocument(doc)
Wend
j=j+1
Goto sled
End If
Суть алгорима: есть коллекция документов, нужно выкинуть из нее документы совпадающие по определенным полям.
Но после удаления документа агент вылетает. Что упустил?