Qury from barcode to sql database