I have a cicle For Next and on this cicle I have a dbseek to search on archive a text i I have on a array because I must change a quantity on a archive
the procedure found only the first text ... why ?
I made :
Local nOldInven:=0
Local nInven:= 0
Local m
Local cTags:="text1; text2; text3 ;" //this is the field i have
Local aNew:=:=iif(AT(';',cTags)!=0, HB_ATokens( cTags, ";"), {}) // I converte on an array
SELECT ET //open ET
ET->(DbSetOrder(1)) //Order on Et->ETNOMBRE ( character )
ET->(DbGoTop())
For m=1 to Len(aNew)
IF!Empty( Upper(Rtrim(aNew[m])))
IF ET->(DbSeek( Upper(Rtrim(aNew[m])), .t. ))
nOldInven:= ET->ETINVEN
nInven:= nOldInven+1
Replace ET->ETINVEN WITH nInven
ET->(DbCommit())
Endif
Endif
next m
where is the error ?