With Query1 do
begin
Close;
SQL.Clear;
SQL.Add('Insert Into Table_A Values(....));
Try
ExecSQL;
Except
On E:Exception do
begin
ShowMessage('错误消息:'+E.Message);
end;
end;
end;
begin
Close;
SQL.Clear;
SQL.Add('Insert Into Table_A Values(....));
Try
ExecSQL;
Except
On E:Exception do
begin
ShowMessage('错误消息:'+E.Message);
end;
end;
end;
...
except
...
end;
Focus(老鱼):其实我想所有的唯一性字段要这样做,不是一定要主键
它的ErrorCode是9729