This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal


May 5, 2015, 11:08 PM
16 Posts

Random type mismatch error

  • Category: Other
  • Platform: Windows
  • Release: 9.0.1
  • Role: Developer
  • Tags: mismatch,random
  • Replies: 3

I have a piece of code that does a lookup to a view to get a document.  This works fine most of the time, however something happens to the Notes Client where the code suddenly returns a type mismatch error.  

This cannot be reproduced.

It randomly happens, then I get the user to restart the Notes client and it works fine.  When it happens to one user, it does not happen to another user doing exactly the same thing.

This is the piece of code where it errors.  As it is a type mismatch I have checked the content of the documents, done a cstr conversion, am pretty clueless as to how this is an error, and that this error disappears once the client has been reopened.

Does anyone have any thoughts on how to fix this?

The docFooter documents do not change regularly (once a month?) - this happens randomly.  The view indexes are okay - and have been rebuilt, just in case.

 

TIA,

A

===================================================================

        If Not (view Is Nothing) Then
            Set docFooter = view.Getfirstdocument()
            While Not (docFooter Is Nothing)
                Forall x In docFooter.ShowFooter
                    If (Cstr(x) = "13") Then    ***** <<< This is where it errors
                        Set rtFooter = docFooter.Getfirstitem("Body")
                        If Not (rtFooter Is Nothing) Then
                            Call rtMailbody.Appendrtitem(rtFooter)
                        End If
                    End If
                End Forall
                Set docFooter = view.Getnextdocument(docFooter)
            Wend
        End If

===================================================================

May 6, 2015, 12:10 AM
326 Posts
On Error

What is the value of x  ?  I would put an on error and print out x.  There might be a strange char like eol in there ( ascii 13 or 10 or 5)

May 6, 2015, 2:14 PM
40 Posts
What if the user tries again without restarting Notes?
If it's repeatable to that extent, maybe you could use Debugger on a follow-up try and find out what the value of x is.
May 6, 2015, 3:21 PM
2 Posts
Print statements
I would suggest inserting some print statements to display the value of x and Cstr(x) before the if condition. Then compare these values when you got the error and after restarting the notes client.

This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal