create a comma seperated string of barcodes and
like
string str = "1111, 11212, 2155";
this can be done by
foreach(DataRow dr in dt.Rows)
{
str += dr["barcode"].ToString() + ",";
}
use query
string query = "SELECT TOP 14 BookCode FROM Inventory where barcode in ('"+ str + "')";