OpenNTF.org - domBulletin
domBulletinOpenDocument[/Projects/pmt.nsf/ProjectView?ReadForm&Query=domBulletin~Discussion]

My Links (Not logged in)
User Name Password
Hosted by Prominic.NET

   Project: domBulletin (Managed by Steve Duncan, Michael Bourak)
Actions:


Subject
 Urgent !! Database does not fetch values from the view
Categories
 Feedback
Posted by
 Roopa B Bangaru on 03/28/2008 at 01:10 AM
Details

Sub Click(Source As Button)
Dim curdb As NotesDatabase
Dim session As New NotesSession
Dim firstview As NotesView
Dim viewdoc As NotesDocument
Dim firstviewcollection As NotesViewEntryCollection


Set curdb =session.Currentdatabase
Set firstview =curdb.GetView("AddForm")
Set firstviewcollection=firstview.AllEntries
Dim Fentry As NotesViewEntry
Set Fentry=firstviewcollection.GetFirstEntry

While Not Fentry Is Nothing
Set viewdoc=Fentry.Document
Msgbox viewdoc.uname(0)

Dim nextdb As NotesDatabase
Dim nextsession As New NotesSession
Dim secondview As NotesView


Set nextdb=nextsession.GetDatabase("","names.nsf")
If Not nextdb Is Nothing Then
Msgbox "A"
End If
Set secondview =nextdb.GetView("($Users)")
If Not secondview Is Nothing Then
Msgbox "B"
End If
Dim secondoc As NotesDocument
Msgbox "Secondloop"
'Set notesDocument = notesView.GetDocumentByKey( keyArray [, exactMatch% ] )
Set secondoc=seconddoc.GetDocumentByKey(viewdoc.uname(0),True)
Msgbox secondoc.shortname(0)
Set Fentry=firstviewcollection.GetNextEntry(Fentry)

Wend

End Sub



The Loop Iterates for the first time and next time it tries to fetch the short name from names.nsf database it does not .. the code is not working from this part

Set secondoc=seconddoc.GetDocumentByKey(viewdoc.uname(0),True)
Msgbox secondoc.shortname(0)
Set Fentry=firstviewcollection.GetNextEntry(Fentry)

Thanks for help
Roopa
Modification history
Entered 28-Mar-2008 1:10 by Roopa B Bangaru. Last Modified <none> by <none>.


Anonymous