I made simple code which first checks the database in SQL for existing login or email and if everything is correct then adds new user to database from Tedit.
Everything works just fine but there is one problem. I can only add strings of numbers or single number. I can't add any text?
While I add any text I get error:
Invalid column name 'thing i typed in Tedit'.
Here is code
begin
ADOQuery2.SQL.Clear;
ADOQuery2.SQL.Add('INSERT INTO users (login, password, email)');
ADOQuery2.SQL.Add(' VALUES ');
ADOQuery2.SQL.Add('('+edtLogin.Text+', '+edtPassword.Text+', '+edtMail1.Text+')');
ADOQuery2.ExecSQL;
ShowMessage('Account created');
edtLogin.Text := '';
edtPassword.Text := '';
edtMail1.Text := '';
edtMail2.Text := '';
Close;
end;