Home > Back-end >  Emergency ~ ~ ~ mydac problem
Emergency ~ ~ ~ mydac problem

Time:09-28

Click a button, a record is added to the database, compiled, click no problem for the first time, can be added, a second click will error:




Code:
 
Procedure TForm1. Button2Click (Sender: TObject);
Var
SQL: string;
The begin
If not RadioButton3. Checked and not RadioButton4. Checked then
The begin
Showmessage (' please select a category add! ');
exit;
end;

SQL:="INSERT INTO ` football `. ` ceshi ` (` name `, ` age `) VALUES (' 9999 a ', '222') '.
MyQuery1. SQL. The Add (SQL);
MYQuery1. Execute;

end;


CodePudding user response:

Superman, you confirm your table does not have the key?
Have your query to clear it.
The add, how are you going to want to add?
  • Related