Ver Mensaje Individual
  #5  
Antiguo 29-11-2012
Avatar de radenf
radenf radenf is offline
Miembro
 
Registrado: oct 2007
Ubicación: Viña del Mar,Chile
Posts: 608
Reputación: 19
radenf Va por buen camino
Utilizé el siguiente código en el evento OnClick del CheckBox (Con False como default)

Código Delphi [-]
with QueryServ do
  begin
    Close;
    // Todos los campos en falso
    QueryServ.SQL.Text:= 'UPDATE Servidores SET ACTIVO = FALSE';
    ExecSql;
    // El campo deseado en true
    QueryServ.SQL.Text:= 'UPDATE Servidores SET ACTIVO = TRUE WHERE ID = :PID';
    QueryServ.Parameters.ParamByName('PID').Value:= serverbox.Checked; // Por ej: el actualmente seleccionado
    ExecSql;

y me entrega el siguiente error:

No se han especificado valores para algunos de los parámetros requeridos.
---------------------------
Aceptar
---------------------------
Responder Con Cita