Skip to main content
BlueMix free trial
 
developerWorks
AIX and UNIX
Information Mgmt
Lotus
New to Lotus
Products
How to buy
Downloads
Live demos
Technical library
Training
Support
Forums & community
Events
Rational
Tivoli
WebSphere
Java™ technology
Linux
Open source
SOA and Web services
Web development
XML
My developerWorks
About dW
Submit content
Feedback



developerWorks  >  Lotus  >  Forums & community  >  Notes/Domino 6 and 7 Forum

Notes/Domino 6 and 7 Forum

developerWorks

  

Sign in to participate PreviousPrevious NextNext

You are getting View Entries NOT Documents
Alan J White 22.Jul.08 01:34 AM a Web browser
Applications Development 6.5.6 All Platforms


Some background first:

a Notesview IS a list built using documents
simple views appear as one row for each document

so there are methods on a view to getfirst document, Getnext etc
This is what is happening in the version of your code that does not error


However a view CAN be more complex
it can be categorised (to many levels)
and have totals or conflicts showing etc.

On screen that results in 'rows' in the list that have no corresponding documents

To cope with this the concept of a ViewEntry is intoduces
There are equivalent methods on a view GetFirstEntry etc

A viewentry object then has properties to tell you what it represents e.g. IsCategory

If a ViewEntry IsDocument a further property allows you to access the corresponding document

Hope that is clear :-)

The key to your problems is that the method you are using to get your collection is v.allENTRIES (my capitalisation)

As the name suggests it returns a collection of ViewEntries NOT (directly) documents.
Since dc is defined as an Object (equivalent to a Variant in Lotusscript) assigning a VE Coll to it not a doc coll produces no error.
Unfortunately once you try to use Doc Coll METHODS they fail.

Your mistake is understandable:
the method allEntries DOES eliminate from the resulting collection any entry where IsDocument is false
however the returned entries are still View Entries not documents
and the collection itself is a VE collection.

There are many ways to avoid this problem e.g based on

______________________________

Dim session As Object
Dim db, doc As Object
Dim v, ec, e As Object

Sub Main()
session = CreateObject("Notes.NotesSession")
db = session.GetDatabase("*****", "*****")
v = db.GetView("*****")
ec = v.AllEntries
e = ec.GetFirstDocument
doc = e.GetDocument

_______________________________


Let us know how you get on




Visual Basic integration issue (Ole Martin Mykl... 21.Jul.08)
. . RE: Visual Basic integration issue (Rob Goudvis 21.Jul.08)
. . . . RE: Visual Basic integration issue (Ole Martin Mykl... 22.Jul.08)
. . You are getting View Entries NOT Do... (Alan J White 22.Jul.08)
. . . . RE: You are getting View Entries NO... (Ole Martin Mykl... 22.Jul.08)
. . . . . . RE: You are getting View Entries NO... (Rob Pinion 22.Jul.08)
. . . . . . . . RE: You are getting View Entries NO... (Ole Martin Mykl... 23.Jul.08)
. . . . . . . . . . RE: You are getting View Entries NO... (Rob Pinion 23.Jul.08)


Document Options






  Document options
Print this pagePrint this page

Search this forum

Forum views and search


  Forum views and search
Date (threaded)
Date (flat)
With excerpt
Author
Category
Platform
Release
Advanced search

Sign In or Register

 Sign In or Register
Sign in
Forgot your password?
Forgot your user name?
Create new registration

Member Tools


RSS Feeds

 RSS feedsRSS
All forum posts RSS
All main topics RSS
More Lotus RSS feeds

Resources

 Resources
Forum use and etiquette
Native Notes Access
Web site Feedback

Lotus Support

 Lotus Support
IBM Support Portal - Lotus software
Lotus Support documents
Lotus support by product
Lotus support downloads
Lotus support RSS feeds

Wikis

 Wikis
IBM Composite Applications
IBM Mashup Center
IBM Connections
IBM Connections Cloud Developers
IBM Docs
IBM Forms
IBM Mobile Connect
IBM Sametime
IBM SmartCloud for Social Business
IBM Web Experience Factory
Lotus Domino
Lotus Domino Designer
Lotus Expeditor
Lotus Foundations
Lotus iNotes
Lotus Instructor Community Courseware
Lotus Notes
Lotus Notes & Domino Application Development
Lotus Notes Traveler
Lotus Protector
Lotus Quickr
Lotus Symphony
IBM Web Content Manager
WebSphere Portal

Lotus Forums


 Lotus Forums
Notes/Domino 9.0
Notes/Domino 8.5 + Traveler
Notes/Domino XPages development forum
Notes/Domino 8
Notes/Domino 6 and 7
IBM Connections
IBM Mobile Connect
IBM Sametime
IBM SmartCloud Notes
Lotus Enterprise Integration
Lotus Protector
Lotus Quickr
Lotus SmartSuite