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
Solved

Limit on COLUMNVALUES array?

Posted on 2003-11-04
8
512 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
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 9680789
0
Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

 
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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

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

I thought it will be a good idea to make a post as it will help in case someone else faces these issues. I trust this gives an idea how each entry in Notes.ini can mean a lot for the Domino Server to be functioning properly. This article discusses t…
Article by: Rob
Notes 8.5 Archiving Steps and Tips This article covers setting up a Notes archive, and helps understand some of the menu choices making setting up and maintaining a Notes archive file easier.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

840 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