Ver Mensaje Individual
  #3  
Antiguo 04-04-2013
Avatar de ecfisa
ecfisa ecfisa is offline
Moderador
 
Registrado: dic 2005
Ubicación: Tres Arroyos, Argentina
Posts: 10.508
Reputación: 36
ecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to behold
Hola Salnhack.

La verdad no entiendo bién el problema pero proba de este modo:
Código Delphi [-]
...
  if suiEdit5.Text<>'' then
  begin
    with DataModule5.ADOQuery1 do
    begin
      Close;
      SQL.Text := 'SELECT TSERVICIOS FROM SERVICIOS WHERE TSERVICIOS = :PSERV';
      Parameters.ParamByName('PSERV').Value := suiEdit5.Text;
      Open;
      if isEmpty then
      begin
        Close;
        SQL.Text := 'INSERT INTO SERVICIOS(TSERVICIOS) VALUES (:PSERV)';
        Parameters.ParamByName('PSERV').Value := suiEdit5.Text;
        ExecSQL;
      end
      else
       ShowMessage('Ese servicios ya EXISTE, por favor revise');
    end;
    with Datamodule5.ADOQuery2 do
    begin
      Close;
      SQL.Text := 'SELECT * FROM SERVICIOS';
      Open;
    end;
    suiEdit5.Clear;
  end
  else
    ShowMessage('Debe llenar el campo del tipo de servicios');
...

Saludos.
__________________
Daniel Didriksen

Guía de estilo - Uso de las etiquetas - La otra guía de estilo ....
Responder Con Cita