Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Limit on COLUMNVALUES array?

Posted on 2003-11-04
8
Medium Priority
?
521 Views
Last Modified: 2013-12-18
I have a view with 33 columns, which I'm accessing remotely via VBA (to read the data into a spreadsheet).
The problem I have is that one of the columns always seems to be missing when open the view up using VBA. Is there a limit to the size of the COLUMNVALUES array?


Dim objNotesSession     As Object       'The Lotus Notes session
Dim objNotesDatabase    As Object       'The Lotus Notes database
Dim objNotesView        As Object       'The Lotus Notes view
Dim objNotesDocument    As Object       'The Lotus Notes document
Dim varColumnValues     As Variant      'Holds the data stored in the notes columns
Dim lngRecordCount      As Long         'The number of records returned
Dim lngCounter          As Long
Dim rs As Recordset
Dim i As Integer
Dim y As Integer
   
Set objNotesSession = CreateObject("Notes.NotesSession")
Set objNotesDatabase = objNotesSession.GETDATABASE("myServer","myDb")
Set objNotesView = objNotesDatabase.GETVIEW("myView")
   
Set objNotesDocument = objNotesView.GETFIRSTDOCUMENT

lngRecordCount = objNotesView.TOPLEVELENTRYCOUNT
For lngCounter = 1 To lngRecordCount
       
        'Get the next document
        Set objNotesDocument = objNotesView.GETNTHDOCUMENT(lngCounter)
         
        'Move the column values into an array
        varColumnValues = objNotesDocument.COLUMNVALUES
       
     
        For i = 0 To UBound(varColumnValues) - 1
             'Store the value somewhere
        Next i
       
Next lngCounter
0
Comment
Question by:mrt1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 2
8 Comments
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 9680716
Here is what you can see as far as limits are concerned

Array storage size      Limited by available memory

Number of elements      Determined by memory available for data, and by the storage size of each element of the array, which varies with the array data type. For example, a Long one-dimensional fixed array declared in type scope can have 16,128 elements. (The total storage size available for fixed-size data in module scope is 64K bytes, and a Long element requires 4 bytes for storage.)

How many columns are allowed in a view?      289 ten-character columns; dependent upon # or characters per column

So you seem to be in good shape.

~Hemanth
0
 
LVL 14

Expert Comment

by:p_partha
ID: 9680760
as far as i know, if the column values is something like "# in view" or some @functions like @docnumber then columnvalues will not see it.

This might be ur problem

Partha
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 9680870
oops, I almost missed the essential part of the question. Well as Partha has described @IsExpandable and @DocNumber and CONSTANTS doesn't show up while using ColumnValues

0
 
LVL 24

Accepted Solution

by:
HemanthaKumar earned 500 total points
ID: 9680925
Let me give you full list of functions that doesn't show any values using columnvalues property

@DocChildren, @DocDescendants, @DocLevel, @DocNumber, @DocParentNumber, @DocSiblings, @IsCategory, @IsExpandable

Also the constant such as number (999) or "User Name: ."  are all discounted. But if a column contains a formula that happens to return the same result for every document, it is not considered a "constant" !
0
 
LVL 14

Expert Comment

by:p_partha
ID: 9681779
Hemanth,
I believe this is not documented., This is documnted only for dblookup and dbcolumns ., but i am sure columnvalues is not considered also


Partha
0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 9682223
you try it. it holds good for columnvalues too.. underlying principle either it is script or formula Notes is one and as far as I know function mostly consistent.

0
 
LVL 31

Assisted Solution

by:qwaletee
qwaletee earned 500 total points
ID: 9684311
Here's the culprit:

        For i = 0 To UBound(varColumnValues) - 1

Why -1 ?  It should be:

        For i = 0 To UBound(varColumnValues)

If you have three columns, then lbound(cv) is 0 and ubound(cv) is 2 -- not 3.  The ubound is the upper limit of the array, NOT the count of array elements.

So, if you go to ubound(cv)-1, you will never reach teh last column of the view.
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For Desktop Techs: How to retain a user's Notes configuration data when swapping out the end user's computer. (Assuming that you are not upgrading to a completely different version of Notes client) All you need to do is: 1) install Notes o…
For beginners of Lotus Notes user this is important to know about the types of files and their location supported by IBM Notes. Mostly users are unaware about how many file types are created and what their usages are. This Article is fully dedicated…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Suggested Courses

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question