I've run into a really strange problem. I've got this chunk of code in my app:
The above code is producing an array with 5 items in it. The problems is, when I enter the loop, it's blowing up on the fourth item with the error "Session number is invalid". If I suspend and do a SET command at that point, I don't see a datasession 4 in the dropdown. If it isn't there, how did ASESSIONS find it?
-BP (Barbara Peisch)
Code:
* There shouldn't be anything open in any datasession
* Make sure there isn't
CLOSE DATABASES ALL
ASESSIONS(aDataSessions)
FOR i = 1 TO ALEN(aDataSessions,1)
SET DATASESSION TO (aDataSessions[i])
CLOSE TABLES ALL
ENDFOR
SET DATASESSION TO 1 && go back to the default datasession
-BP (Barbara Peisch)