Skip to main content
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

Notes/Domino 6 and 7 Forum

Notes/Domino 6 and 7 Forum


  

PreviousPrevious NextNext


~Dexter Cislulitoopsi 29.Oct.03 05:35 PM a Web browser
Applications Development 6.0.2 CF1 iSeries


I've written a LotusScript agent that builds a result set from a physical file on an AS/400, reads through that result set, and for each record it retrieves, it might update several Notes documents, and then delete the record from the AS/400.

The agent works perfectly if I run it from my client. If there are 9 records in the physical file, is processing all 9 one-by-one and deletes all records one-by-one once they have been processed; i.e. once the corresponding Notes documents have been updated.

The problem is that if I all my Domino server to execute the agent, it only reads the first record, updates the corresponding Notes documents, and then deletes that first record. It doesn't process any additional records. It seems as though the DeleteRow method is leaving the file pointer at end-of-file so that my subsequent NextRow returns false. I've tried numerous things, but none have worked. I've tried using FirstRow after the delete thinking I need to reposition to the first row now that the original first row has been deleted. That didn't work either.

Below is my code without all the declarations:

Status% = con.ConnectTo("ALPHA", user, pswd)
Set qry.Connection = con
qry.Sql = "select * from plcustf.tlfrompl"
Set res.Query = qry
Status% = res.Execute
Status% = res.FirstRow

While Status% = True

key = res.GetValue("UNIQID")
aYear = res.GetValue("VHEXYR")
aMonth = res.GetValue("VHEXMN")
Set collection = view.GetAllDocumentsByKey
(key)
If collection.count >= 0 Then
For i = 1 To collection.count
Set doc = collection.GetNthDocument(i)
doc.AccountingYear = aYear
doc.AccountingMonth = aMonth
Call doc.Save (True, True)
Next
End If

res.deleteRow("plcustf.tlfrompl")
Status% = res.NextRow

Wend

res.close (db_close)
con.disconnect






Resetting File Pointer After A Dele... (~Dexter Cisluli... 29.Oct.03)
. . RE: Resetting File Pointer After A ... (~Dexter Cisluli... 29.Oct.03)
. . RE: Resetting File Pointer After A ... (~Bill Frokimari... 29.Oct.03)
. . . . RE: Resetting File Pointer After A ... (~Dexter Cisluli... 30.Oct.03)
. . . . . . RE: Resetting File Pointer After A ... (~Bill Frokimari... 30.Oct.03)
. . . . . . . . RE: Resetting File Pointer After A ... (~Dexter Cisluli... 31.Oct.03)
. . . . . . . . . . RE: Resetting File Pointer After A ... (~Bill Frokimari... 31.Oct.03)





  Document options
Print this pagePrint this page

 Search this forum

  Forum views and search
Date (threaded)
Date (flat)
With excerpt
Category
Platform
Release
Advanced search

 RSS feedsRSS
All forum posts RSS
All main topics RSS