Trying to insert a value into my database pascal

edited January 2017 in Pascal

procedure TForm1.loginbtClick(Sender: TObject);
var
tpassword:string; //tempory will use a comparison later on
begin
sqlquery1.close;
sqlquery1.sql.Text:='SELECT * FROM logins WHERE login = :LOGIN';
sqlquery1.Params.ParamByName('LOGIN').AsString:=txtUsername.text;
sqlquery1.sql.Text:='SELECT * FROM logins WHERE password = :PASSWORD';
sqlquery1.Params.ParamByName('PASSWORD').AsString:=txtPassword.text;
HERE IS WHERE I WANT TO INSERT A VALUE OF 1 into the same table logins but row score
sqlquery1.active:=true;
//this is how we take a value from a query result and store it in a variable:
//the password of the corresponding username is retrieved from the DB
sqlquery1.close;
if txtPassword.text=tpassword then
begin
Form3.show;
end
else
begin
showmessage('Sorry, your password is incorrect');
end;
end;

https://postimg.org/image/tep6d94v5/

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories