El problema es que no estas manejando bien las transacciones:Prueba con Esto:
// fDatos es un DataModule
// Server es el componente TDataBase
Código Delphi
[-]if fDatos.Server.InTransaction then fDatos.Server.RollBack;
fDatos.Server.StartTransaction;
try FClientes.QueryClientes.SQL.Clear;
FClientes.QueryClientes.SQL.Add('insert into clientes');
FClientes.QueryClientes.SQL.Add(' values (:codigo, :nombre, :dni,
:nomb_comerc, :direccion;');
FClientes.Queryclientes.ParamByName('codigo').AsString:= ECodigo.Text;
FClientes.Queryclientes.ParamByName('nombre').AsString:= ECliente.Text;
FClientes.QueryClientes.ParamByName('dni').AsString:= EDni.TExt;
FClientes.QueryClientes.ParamByName('nomb_comerc').AsString:=
Enombcomer.text;
FClientes.QueryClientes.ParamByName('direccion').AsString:= Edirecc.text;
FClientes.Queryclientes.ExecSQL; fDatos.Server.Commit;
except
if fDatos.Server.InTransaction then
fDatos.Server.Rollback; MessageDlg('Se ha producido un error al intentar
agregar el Cliente.', mtError, [mbOK], 0);
end;
FClientes.QueryClientes.SQL.Clear;
FClientes.QueryClientes.SQL.Add('select * from clientes');
FClientes.QueryClientes.Open;
Saludos