제가 오라클 db연결 후 로그인 예외처리 if문으로 해본건데..
아이디가 틀리고 비밀번호가 맞는 상태에서 로그인하면 비밀번호가 틀리다고 뜨네요.. 뭐가 잘못된건가요..?
IF Edit1.Text = '' THEN
begin
Label3.Caption :='아이디를 입력하세요.';
Edit1.SetFocus;
end;
IF (Edit2.Text = '') AND (Edit1.Text <> '') THEN
begin
Label3.Caption :='비밀번호를 입력하세요.';
Edit2.SetFocus;
end;
IF Edit1.Text = '' THEN
begin
IF Edit2.Text = '' THEN
Label3.Caption := '아이디와 비밀번호를 입력하세요';
Edit1.SetFocus;
end;
IF (Edit1.Text <> '') AND (Edit2.Text <> '') THEN
begin
IF (CompareText('ID',Edit1.Text) <> 0) THEN
begin
Label3.Caption := '아이디가 틀립니다.';
Edit1.SetFocus;
end
end;
IF (Edit1.Text <> '') AND (Edit2.Text <> '') THEN
begin
IF (CompareText('ID',Edit1.Text) >0) AND (CompareText('PW',Edit2.Text) <> 0) THEN
begin
Label3.Caption := '비밀번호가 틀립니다.';
Edit2.SetFocus;
end
end;
IF NOT ((Query1.Eof) AND (Query1.Bof)) THEN
begin
Label3.Caption := '로그인 성공';
end;
|