Anyone know how I can insert and take integer values from a sqlite 3 db 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;
//INSERT A value of 1 into my database here!
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;

I am trying to get it to insert a value of 1 into the score row in my table.

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

In this Discussion