crewchiefpro6
Programmer
I am trying to construct an SQL command from a mover list and wonder what the problem is.
The mover list is populated fine, and I can see the results in a messagebox, however, when I try to construct a usable SQL command from the list it fails to run.
Here is the code I am using (Click Event From Button):
LOCAL nCnt, nTotalListCount, lcAnswer
nTotalListCount = thisform._supermover1.lstRight.ListCount
lcAnswer = ""
FOR nCnt = 1 to nTotalListCount
lcAnswer = IIF(EMPTY(lcAnswer),ALLTRIM(thisform._supermover1.lstRight.List(nCnt)) + ;
IIF(nCnt < nTotalListCount," .or. session = ", ""), ;
lcAnswer + ALLTRIM(thisform._supermover1.lstRight.List(nCnt)))
ENDFOR
SET STEP on
SELECT * from icard ;
where session = lcAnswer ;
into cursor csrTestMover
Don Higgins
The mover list is populated fine, and I can see the results in a messagebox, however, when I try to construct a usable SQL command from the list it fails to run.
Here is the code I am using (Click Event From Button):
LOCAL nCnt, nTotalListCount, lcAnswer
nTotalListCount = thisform._supermover1.lstRight.ListCount
lcAnswer = ""
FOR nCnt = 1 to nTotalListCount
lcAnswer = IIF(EMPTY(lcAnswer),ALLTRIM(thisform._supermover1.lstRight.List(nCnt)) + ;
IIF(nCnt < nTotalListCount," .or. session = ", ""), ;
lcAnswer + ALLTRIM(thisform._supermover1.lstRight.List(nCnt)))
ENDFOR
SET STEP on
SELECT * from icard ;
where session = lcAnswer ;
into cursor csrTestMover
Don Higgins