Solved

Limit on COLUMNVALUES array?

Posted on 2003-11-04
8
517 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
[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

 
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 125 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 125 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

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…
Sometimes clients can lose connectivity with the Lotus Notes Domino Server, but there's not always an obvious answer as to why it happens.   Read this article to follow one of the first experiences I had with Lotus Notes on a client's machine, my…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

617 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