Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

R6 - LS:DO error

Status
Not open for further replies.

lespaul

Programmer
Feb 4, 2002
7,083
US
We recently moved our courthouse and two of the changes that were made during the move was an upgrade to IBM AS400 server ISeries and Lotus Notes 6. I have a Notes application that allows interviews to be recorded and stored. One of the process in this application is the ability to duplicate a previous interview (because unfortunately we do have repeat offenders and instead of filling out an entire interview again, the program copies most of the information from the first interview into the second to save time). However, with the upgrade to version 6 this process no longer works properly.

The offending line of code is the Loop Until:

Code:
If disct = "" Then
qry.SQL = "SELECT DEFNAM, DEFADD, DEFCTY, DEFSTT, DEFZCD, DEFSEX, DEFALA, DEFAGE, DEFDTOB, DEFSSN, BOOKING#, CMLIB.CMPCHGMF.CHGSEQ, CHGDSS, CHGABV FROM CMLIB.CMPDEFMF INNER JOIN CMLIB.CMPCHGMF ON CMLIB.CMPDEFMF.CASPRE = CMLIB.CMPCHGMF.CASPRE AND CMLIB.CMPDEFMF.CASNUM = CMLIB.CMPCHGMF.CASNUM INNER JOIN CMLIB.CMPCHGTP ON CMLIB.CMPCHGMF.CHGTYP = CMLIB.CMPCHGTP.CHGTYP WHERE (CMLIB.CMPDEFMF.CASPRE ='" + pfx + "' AND CMLIB.CMPDEFMF.CASNUM=" + nbr +")  "

result.Execute
Do				
   result.NextRow
   For i = 13 To 14
   chgs = chgs & "  " & result.GetValue(i)
   Next
Loop Until result.IsEndOfData

Now when I step through this code in the debugger IT WORKS FINE!!!!! When I let the code run without debugging I get an error:

ERROR said:
LS:DO The end of data has been reached.

I have recompiled the Lotus Script in Designer. I have added a If not result.IsEndOfData before the loop and I STILL get the error.

Anyone have any ideas?

Thanks,

Leslie


 
Well, I ended up catching that error in an if statement and just continuing with the function. Not an elegant solution, but my users are happy!

Code:
If disct = "" Then
  qry.SQL = "SELECT DEFNAM, DEFADD, DEFCTY, DEFSTT, DEFZCD, DEFSEX, DEFALA, DEFAGE, DEFDTOB, DEFSSN, BOOKING#, CMLIB.CMPCHGMF.CHGSEQ, CHGDSS, CHGABV FROM CMLIB.CMPDEFMF INNER JOIN CMLIB.CMPCHGMF ON CMLIB.CMPDEFMF.CASPRE = CMLIB.CMPCHGMF.CASPRE AND CMLIB.CMPDEFMF.CASNUM = CMLIB.CMPCHGMF.CASNUM INNER JOIN CMLIB.CMPCHGTP ON CMLIB.CMPCHGMF.CHGTYP = CMLIB.CMPCHGTP.CHGTYP WHERE (CMLIB.CMPDEFMF.CASPRE ='" + pfx + "' AND CMLIB.CMPDEFMF.CASNUM=" + nbr +")  "
  result.Execute
  Do				
  result.NextRow
  For i = 13 To 14
    chgs = chgs & "  " & result.GetValue(i)
  Next
  Loop Until result.IsEndOfData
  If result.GetErrorMessage <> "NO ERROR"  Then 
    [COLOR=red]If result.GetErrorMessage <> "LS:DO- The end of data has been reached." Then[/color]
      Messagebox result.GetExtendedErrorMessage,,result.GetErrorMessage
      result.Close(DB_CLOSE)
      con.Disconnect			
      Exit Sub
    End If
  End If
  If result.NumRows=0 Then
    Messagebox "Invalid Case Number."
    result.Close(DB_CLOSE)
    con.Disconnect
    Exit Sub
  End If

Leslie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top