As oodesigner stated, a better method would be to use parameters. I don't know what text book you are looking at, but the code given isn't really best practice (it isn't worst practice either, at least it uses QuotedStr
rather than '''' + edtname.Text + ''''
which fails the first time you use something like O'Connell, and allows SQL injection attacks.
Using parameters and assuming SQL Server syntax as per Rob's answe, and assuming TADOQuery (based on the EOLEException) the code would be something like:
qryreg.SQL.Add('Insert into RegistreerTB');
qryreg.SQL.Add('(Name , Surname, [E-mail], Password)'); //SQL Server syntax with square brackets
// OR qryreg.SQL.Add('(Name , Surname, "E-mail", Password)'); //Oracle/Postgres syntax with double quotes
// OR qryreg.SQL.Add('(Name , Surname, `E-mail`, Password)'); //MySQL syntax with grave accent
qryreg.SQL.Add('Values :Name, :Surname, :Email, :Password)');
qryreg.Parameters.ParamByName('Name').Value := edtName.Text;
qryreg.Parameters.ParamByName('Surname').Value := edtSName.Text;
qryreg.Parameters.ParamByName('Email').Value := edtEmail.Text;
qryreg.Parameters.ParamByName('Password').Value := edtPassUse.Text;
qryreg.ExecSQL;
qryreg.SQL.Text := 'Select * from RegistreerTB';
qryreg.Open ;