I get the variable Chat_Id from a hash and I saw that it is a numeric variable
in the archive where I have to look for this variable I have a string field and the archive is indexed in this way
- Code: Select all Expand view RUN
INDEX ON UPPER(NumeroID) TAG TEACH01 EVAL (oProgress:SetPos(nProgress++), Sysrefresh()) EVERY 1
the structure of archive is
- Code: Select all Expand view RUN
- DbCreate(cDir+'TE', { { "NumeroId", "C", 20, 0 },;
{ "fname", "C", 20, 0 },;
{ "uname", "C", 20, 0 },;
{ "lname", "C", 20, 0 },;
{ "isteacher", "L", 1, 0},;
{ "isadmin", "L", 1, 0} }, 'DBFCDX')
- Code: Select all Expand view RUN
- so when I do the research I do this way
- Code: Select all Expand view RUN
- cChiaveId:=alltrim(str(Chat_Id))
SELECT TE
TE->(OrdSetFocus(1))
TE->(DbGoTop())
if ! TE->(DbSeek( cChiaveId, .t. ))
else
lKnown:=.t.
listeacher= TE->isteacher
lisadmin := TE->isadmin
endif
the problem is that the search never recognizes the ID number, where is the error?