procedure TForm1.Button1Click(Sender: TObject); begin list1:=ADOTable1.FieldByName('login').AsString; label3.Caption:=list1; list2:=ADOTable1.FieldByName('password').AsString; label4.Caption:=list2; If edit2.Text=list2 Then label5.Caption:='0' else label5.Caption:='1'; end; 

The condition is always wrong (label5 displays 1), although the correct password is entered into edit2. Tell me, what am I doing wrong?

    1 answer 1

    I can assume that this is a problem with varchar and ADOTable1.FieldByName('password').AsString returns, say, not "pass" , but "pass " . Those. there is an armful of gaps in the results of the queries in the tail of the field.

    • Thank! It helped. - Naicon 7:09 pm
    • If it helps, mark the answer as accepted. - Nofate 7:09 pm