Greetings,
Please note that in situations where the cursor has only one updatable field the method for cDataBehavior in cBhavior.vcx should be modified.
In the current code the variables lnPos1 and lnPos2 are not declared. It is suggested that these variables be declared and set to zero high in the program code.
*** Added option for checking just updatable fields. lcUpdList = CURSORGETPROP("UPDATABLEFIELDLIST") IF EMPTY(lcUpdList) * No udpatable fields, so no conflict. RETURN FILE_OK ENDIF
* Create the laFields array from the * comma-separated list of values returned. lnFields = OCCURS(",", lcUpdList) + 1 DIMENSION laFields(lnFields, 1)
lnPos1 = 0 FOR lnCnt = 1 TO (lnFields-1) lnPos2 = AT(",", lcUpdList, lnCnt) laFields[lnCnt, 1] = SUBSTR(lcUpdList, ; lnPos1+1, (lnPos2 - lnPos1)-1) lnPos1 = lnPos2 ENDFOR laFields[lnFields, 1] = SUBSTR(lcUpdList, lnPos2+1)
Notice that when we enter the FOR loop, if there is only one updatable field the expression says FOR .. 1 TO zero. The loop is skipped. The variable lnPos2 is not defined and creates an error. James Sayer ©2001 James Sayer |