ADOQuery1.SQL.Add('Select ...'); ADOQuery1.Open; a := ADOQuery1.Fields[0].AsInteger; ADOQuery1.Close;