Sergey
Thanks for your response.
The JOBS table has TWO records with the specified GROUPID: "GRP10000009"
I cut'n'pasted your example. Here's what I get:
SET STEP ON
RELEASE jArray
LOCAL ARRAY jArray[1]
SELECT jobs.JobName, jobs.JobID FROM JOBS ;
WHERE GROUPID = "GRP10000009" ;
INTO ARRAY jArray
IF _TALLY = 0
* No records selected, jArray hasn't been changed
ENDIF
Your jArray is dimensioned as ONE element. When the SELECT executes it populates THAT ELEMENT with
only ONE of the TWO records present in the JOBS table that have the requested GROUPID. The resultant array has only ONE element populated with the Jobs.JobName field content. It is not redimensioned to hold the actual results.
NOW....Here's the good part:
In the Debugger, if I look at the Locals window I see an array jarray---jarray[1] with a single value of the JOBS.JobName of the first record only. If, however, I look at the Watch window where I've entered jarray as the var to Watch, I see a CORRECT array with values from BOTH Jobs records and 4 elements.
This is strange...
Thanks
David
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement