I used to have a common routine in which I could pass back the ODBC resultset; the calling routines could then interrogate and extract the data (multiple rows) from the resultset.
I have a script A to which the sql selectionstatement is passed
If I understand this correctly, I can pass back the LCFieldList which is the result of the src.Fetch. I’m just confused about how to process this is if I have a multi-row result from the Fetch.
Use the Fetch method of the LCConnection object in a loop:
Set g_rstData = New LCFieldList
lReturn = g_ConData.Execute(sSQL, g_rstData)
If lReturn > 0 Or lReturn = LCCOUNT_UNKNOWN Then
While g_conData.Fetch(g_rstData, 1) > 0
sLoader = g_rstData.Fields(0).Value(0)
…
Wend
End If
That’s some old code I had laying around. A better approach is to use LCField’s. It’s more effort to set up initially but it executes faster and the code is easier to understand.
A good guide to look at is the LEI 6 Redbook (http://www.redbooks.ibm.com/abstracts/sg246067.html?Open). You can also try to muddle your way through the Lotus Connectors reference. It’s accessible from the normal Domino Designer help, or you can open it directly from the Notes help folder on your hard drive.
Good luck. LC LSX is good stuff, but it’s way more difficult to get started with than it should be.