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


Jun 7, 2016, 1:34 PM
11 Posts

DB2 and Domino, LCConnection & LCFieldList, error: Invalid Field

  • Category: Application Development
  • Platform: Windows
  • Release: 9.0
  • Role: Developer
  • Tags:
  • Replies: 0

Whenever I run the following script I receive this error: "ERROR: Invalid Field"

This error comes when I reach this line "Set fld = fldLst.Lookup (000010)"

    Dim src As New LCConnection ("db2") 
    Dim fldLst As New LCFieldList
    Dim fld As LCField
    Dim count As Integer
    
    ' set the appropriate properties to connect
    src.Database = "sample"
    src.Userid = "db2admin"
    src.Password = "password"
    
    src.Connect
    
    ' now connected, we can execute a selection statement
    If (src. Execute ("SELECT * from employee",  fldLst) = 0) Then
        Print "No records were fetched."
        End
    End If
    Set fld = fldLst.Lookup (000010)
    Print "the 'contact names' stored in the table are:"
    
    ' fetch each record from the result set
    While (src.Fetch (fldLst) > 0)
        count = count + 1
        Print "     record #" & Cstr(count) & " = '" & fld.text(0) & "'"
    Wend
    If (count = 0) Then Print "No records were fetched."

Any ideas where is the issue


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