Ver Mensaje Individual
  #1  
Antiguo 26-10-2010
agustin173 agustin173 is offline
Miembro
 
Registrado: jun 2010
Posts: 158
Reputación: 17
agustin173 Va por buen camino
Determina si existe un registro

hola nuevamente

tengo un problema para saber si existe un registro me explico mejor

Estoy usando delphi 7
una tabla llamada = Area
un edit llamado = EDArea
un combobox llamado = CBPaisBuscar
Adoquery llamado = Temp

Código Delphi [-]
// Determina si Existe un Registro en la Base de Datos
 with Temp do
  begin
    Temp.close;
    Temp.sql.Clear;
    Temp.sql.Add('select Area,Pais from Area');
    Temp.sql.Add('where Area = '+QuotedStr(EDAreaBuscar.Text));
    Temp.open
  end;
   if not Temp.IsEmpty then
     raise exception.Create('Registro Existe');
 end;

Lo que yo deseo es que si el registro del Area y Pais son igual al de la base de dato me diga registro existe.
Responder Con Cita