Hi Sergey,
>Why aren't you using SELECT...INTO ARRAY? It doesn't change record pointer.
>
I guess for two reasons:
1. I have always been in the habit of avoiding arrays as I find variable names much more descriptive.
2. This is running against a buffered cursor with non-committed changes in it so SELECT .. INTO won't work on the buffered data (yes I know there was a switch added recently that fixes that, but I haven't got in the habit of using it). Hmmm... is that my answer, does SUM work on the non-buffered data only? Nah, I would get 67 as the result as I only added 1.
>>I am running this code:
>>
>>
>>SELECT c_NationalityDetails
>>m.lnOldRecNo = RECNO()
>>
>>SUM nad_nonnationals, nad_nationals, nad_nonnationals + nad_nationals TO nSum1, nSum2, nSumTotal
>>
>>WAIT WINDOW TRANSFORM(nSum1) + " + " + TRANSFORM(nSum2) + " = " + TRANSFORM(nSumtotal)
>>
>>
>>I get the following displayed:
>>
>>64 + 4 = 9
>>
>>Does anyone have any idea why this could be happening?
>>
>>I've tried the sample code in the help on SUM and that displays correctly.
>>
>>I am stumped!