Error in Array Index
Posted: Tue Jun 21, 2016 6:45 am
Roger,
This one is driving me crazy.Code has been the same on this since we wrote the program. (too long ago to remember)
We initialize here at the top of the program when it opens:
select 36
use appttype
set order to
goto top
DECLARE Alist[RECCOUNT()]
DECLARE Clist[RECCOUNT()]
Z=1
DO WHILE Z<=RECCOUNT()
STORE apptDESC TO Alist[Z]
STORE apptCODE TO Clist[Z]
Z=Z+1
SKIP
ENDDO
Get is here:
@ 15,8 DCCOMBOBOX TYPE XBPCOMBO_DROPDOWNLIST cStyp LIST aLIST SIZE 12,zn ;
ITEMSELECTED {||vdshipappt:=cList[ASCAN(aList,cStyp)],dc_getrefresh(getlist) }
Get this message when they are updating (but only on rare occasions)
oError:args :
-> VALTYPE: A VALUE: {"C", "F", "D", "N", "R", "W"}
-> VALTYPE: N VALUE: 0
oError:description : Error in array index
oError:filename :
oError:genCode : 4
oError:operation : <A of 6>[<0>]
Only happens in one location, and only once every 2000-3000 times they are in what we call our booking screen.
Does this mean that the var vdshipappt is a numeric zero? Its always one of those character codes listed. There are two such combo boxes with the same choices and it happens sometimes on one, sometimes on the other. At this point just clarifying that the program at that moment thinks the var is a numeric 0.
Thanks
Fred
Omni
This one is driving me crazy.Code has been the same on this since we wrote the program. (too long ago to remember)
We initialize here at the top of the program when it opens:
select 36
use appttype
set order to
goto top
DECLARE Alist[RECCOUNT()]
DECLARE Clist[RECCOUNT()]
Z=1
DO WHILE Z<=RECCOUNT()
STORE apptDESC TO Alist[Z]
STORE apptCODE TO Clist[Z]
Z=Z+1
SKIP
ENDDO
Get is here:
@ 15,8 DCCOMBOBOX TYPE XBPCOMBO_DROPDOWNLIST cStyp LIST aLIST SIZE 12,zn ;
ITEMSELECTED {||vdshipappt:=cList[ASCAN(aList,cStyp)],dc_getrefresh(getlist) }
Get this message when they are updating (but only on rare occasions)
oError:args :
-> VALTYPE: A VALUE: {"C", "F", "D", "N", "R", "W"}
-> VALTYPE: N VALUE: 0
oError:description : Error in array index
oError:filename :
oError:genCode : 4
oError:operation : <A of 6>[<0>]
Only happens in one location, and only once every 2000-3000 times they are in what we call our booking screen.
Does this mean that the var vdshipappt is a numeric zero? Its always one of those character codes listed. There are two such combo boxes with the same choices and it happens sometimes on one, sometimes on the other. At this point just clarifying that the program at that moment thinks the var is a numeric 0.
Thanks
Fred
Omni