I am having a problem pulling multiple rows of information in a DB2 Table over to a body field in a notes document. Here is the background. There are 4 files of information on the AS/400 that I need to pull information from to send out a Notes Email message. One is the header, one is detail, then we have an attachment header and an attachment detail. In working with the detail file which is keyed with a sequence number to the header, there maybe multiple rows of text that go into one body field in the notes message. Can anyone give me an example or point me in the right direction on how I would do this. I am pulling the first row of information fine by doing a qry.sql statement and getting the value for the field but it will not go down to the next row and get the information and add it to the body text. Any help would be greatly appreciated. Thank you for your time.
Subject: Are you using nextRow?
partial code example…
If (dbcon.ConnectTo(“ICMNLSDB”,“ICMADMIN”,“server”)) Then
Set dbqry.Connection = dbcon
dbqry.SQL = tmp$ + " " + KeyValue + " " + tmp1$ '***this works!!
Set dbset.Query = dbqry
Call dbset.Execute
If(dbset.GetError = DbstsNCON) Then
Msgbox "Table did not return any columns"
End If
'this maybe the line you need
If (dbset.NumRows <> 0) Then
Do
dbset.NextRow
If dbset.IsResultSetAvailable Then
Subject: RE: Are you using nextRow?
I was using NextRow but was not using loop until result2.isendofdata. And, I had the Text string = result2.getvalue (“XXXX”) in the wrong place. Thank you so much for your help.