Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Limit on COLUMNVALUES array?

Posted on 2003-11-04
8
Medium Priority
?
524 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
  • 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
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.

 
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Lack of Storage capacity is a common problem that exists in every field of life. Here we are taking the case of Lotus Notes Emails, as we all know that we are totally depend on e-communication i.e. Emails. This article is fully dedicated to resolvin…
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…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Loops Section Overview

824 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