Hola.
Entonces se trata de los componentes
dbExpress.
La busqueda usando un
TSQLQuery sería:
Código Delphi
[-]
function ExisteElDato(AQuery: TSQLQuery; Dato: string): Boolean;
begin
with AQuery do
begin
Close;
SQL.Clear;
SQL.Add('SELECT * FROM TU_TABLA');
SQL.Add('WHERE TU_CAMPO = :DATO');
ParamByName('DATO').AsString:= Dato;
Open;
Result:= not IsEmpty;
end;
end;
Deberás reemplazar: TU_TABLA y TU_CAMPO, por los nombres que le hayas dado a la tabla y al campo sobre el que realizás la búsqueda.
Ejemplo de uso:
Código Delphi
[-]
if ExisteElDato(SQLQuery1, Edit1.Text) then
ShowMessage('Existe')
else
ShowMessage('No existe');
Un saludo.