When I download from Excel into dbf I save on a field a string of name of Teachers
when I have to convert to another archive, I break the surname and name and check if there is a comma
sample

I state the list in excel is created by the end user
on the my function
aTokens := HB_ATokens( cDocente, ", " ,.t.,.t.)
cCognome := alltrim(aTokens[1])
cNome := alltrim(aTokens[2])
however it can happen to find a space before the comma or the space is after the comma
and when it finds these problems it makes me error and exits the program
sample
How can I avoid this error?
when I have to convert to another archive, I break the surname and name and check if there is a comma
sample

I state the list in excel is created by the end user
on the my function
aTokens := HB_ATokens( cDocente, ", " ,.t.,.t.)
cCognome := alltrim(aTokens[1])
cNome := alltrim(aTokens[2])
however it can happen to find a space before the comma or the space is after the comma
and when it finds these problems it makes me error and exits the program
sample
Error occurred at: 21-01-2022, 12:11:27
Error description: Error BASE/1132 Limiti superati: accesso all'array
Args:
[ 1] = A {"VISCHIA ,MICHELA"} length: 1
[ 2] = N 2How can I avoid this error?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com