Suggest a feature
×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Delphi
Posted by: Mario Lopes
Added: Sep 19, 2018 10:06 AM
Views: 37
Tags: insert record
Para os meus alunos adorados, o Insert em Delphi
  1.  zquery1.Close;
  2. zquery1.SQL.Clear;
  3. zquery1.SQL.Add('insert into dados (nome,idade) values (:a,:b)');
  4. zquery1.ParamByName('a').AsString:=edit1.Text;
  5. zquery1.ParamByName('b').AsInteger:=StrToInt(edit2.text);
  6. zquery1.ExecSQL;
  7. ShowMessage('Registo Inserido');