I am a new developer in Lotus.I have something wrong when I use LCConnection to connect Notes in my agent.The error message on the console is “Metadata object does not exist”.But I have assigned a value which was the name of the form to it.And the agent ran successfully once,but it does’t work in most time.Could anyone please help me?Thanks very much.My code:
Sub Initialize
On Error Goto oops
Dim lcconNotes As New LCConnection("notes")
Dim session As New NotesSession
Dim db As NotesDatabase
Set db = session.CurrentDatabase
Dim flNotes As New LCFieldList
lcconNotes.server = db.Server
lcconNotes.database = db.FilePath
lcconNotes.Metadata = "UploadAttForm"
Call lcconNotes.Connect
Call lcconNotes.Select(Nothing, 1,flNotes)
Do While lcconNotes.Fetch(flNotes) > 0
Msgbox flNotes.GetField(2).text(0)
Loop
oops:
Msgbox "Error " & Err & ": " & Error & Erl
Exit Sub
End Sub