Advertisement
Guest User

Untitled

a guest
May 28th, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Delphi 0.80 KB | None | 0 0
  1. var Pid, command, x, anstdatum: string;
  2.   Telnr: integer;
  3. begin
  4.   try
  5.     Pid := textbox1.text;
  6.     Telnr := int32.parse(textbox2.text);
  7.     anstdatum := textbox3.text;
  8.     x := '''';
  9.     Suntripdb.open;
  10.     try
  11.    
  12.       mittinsert := bdpcommand.create(command, suntripDB);
  13.       mittinsert.executenonquery;
  14.      
  15.       if textbox3.text<>'' then
  16.        begin  
  17.      command := 'UPDATE Personal SET telefon=' + x + telnr.tostring + x +'WHERE pid=' + x + pid + x;
  18.     mittinsert := bdpcommand.create(command, suntripDB);
  19.         mittinsert.executenonquery;
  20.     end;
  21.  
  22.       label5.Text := 'Du har lyckats ändra telefon nummer till ' + telnr.tostring;
  23.      finally
  24.       suntripdb.close;
  25.     end;
  26.   except on
  27.     system.FormatException do
  28.       label5.text := 'Felaktig inmatning';
  29.   end
  30. end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement