Created
June 6, 2021 15:00
-
-
Save viniciussanchez/c5ab0ab737e7ee359cd58e227dd65f90 to your computer and use it in GitHub Desktop.
Without SQL Injection
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
begin | |
qryUsuarios.SQL.Clear; | |
qryUsuarios.SQL.Add('select *'); | |
qryUsuarios.SQL.Add(' from user'); | |
qryUsuarios.SQL.Add(' where login = :login'); | |
qryUsuarios.SQL.Add(' and password = :senha'); | |
qryUsuarios.ParamByName('login').AsString := edtUsuario.Text; | |
qryUsuarios.ParamByName('senha').AsString := edtSenha.Text; | |
qryUsuarios.Open(); | |
if qryUsuarios.IsEmpty then | |
lblResultado.Caption := 'ERRO!!!' | |
else | |
lblResultado.Caption := 'Ok'; | |
end; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment