Establece el código como parámetro:
Código SQL
[-] select * from stock
where identificador = :Codigo
Luego asignas el valor de tu parametro:
Código Delphi
[-]
with TuQuery do begin;
if active then close;
ParamByName('Codigo').AsInteger:=strtoint(edit1.text);
Open;
if IsEmpty then
showmessage('vacio');
...
...
Close;
end;