ASORT(laDBFInfo) for i=1 to lnFieldNumber-1 if laDBFInfo[i,1] == laDBFInfo[i+1,1] llFoundErrors = .t. gcmessage = gcmessage + 'Duplicate column ' + laDBFInfo[i,1] + ' found.' EXIT endif endfor>I am trying the For lopp, but am getting 'subscript is out of range' errors. Perhaps I need to give a little more info. The array I am trying to search is created by AFields().
>if ascan(laDBFInfo,'primekey',1,lnFieldNumber,1,1) = 0 > llFoundErrors = .t. > gcmessage = gcmessage + 'Required column PRIMEKEY is missing.<br>' >else > lnOccurs = 0 > for i=1 to lnFieldNumber > if ascan(laDBFInfo,'primekey',i,lnfieldnumber,1,7) <> 0 > lnOccurs = lnOccurs + 1 > endif > endfor > if lnOccurs > 1 > llFoundErrors = .t. > gcmessage = gcmessage + 'Duplicate column PRIMEKEY found.<br>' >endif >>CAn anyone see what I am doing wrong here?