I needed to query data column which contains Binary data. Each character indicates amenities.
I have inserted the column values in to a new table and queried the table for filtering.
DataTable dtamenities = new DataTable();
dtamenities.Columns.Add("RESTAURANT", typeof(string));
dtamenities.Columns.Add("BAR", typeof(string));
dtamenities.Columns.Add("LAUNDRY", typeof(string));
dtamenities.Columns.Add("ROOMSERVICE", typeof(string));
dtamenities.Columns.Add("SAFEDEPBOX", typeof(string));
dtamenities.Columns.Add("PARKING", typeof(string));
dtamenities.Columns.Add("SWIMMING", typeof(string));
dtamenities.Columns.Add("INTERNET", typeof(string));
dtamenities.Columns.Add("GYM", typeof(string));
dtamenities.Columns.Add("AIRCONDITION", typeof(string));
dtamenities.Columns.Add("BUSINESSCENTER", typeof(string));
dtamenities.Columns.Add("MEETINGROOMS", typeof(string));
dtamenities.Columns.Add("SPA", typeof(string));
dtamenities.Columns.Add("PET", typeof(string));
dtamenities.Columns.Add("PropertiesTypeProperty_Id", typeof(int));
// Code to bind amenities for the hotel response
for (int i = 0; i < dsHotelSearchResults.Tables["HotelAmenity"].Rows.Count; i++)
{
string code = dsHotelSearchResults.Tables["HotelAmenity"].Rows[i]["Code"].ToString();
string val = code[0].ToString();
DataRow row = dtamenities.NewRow();
row["RESTAURANT"] = code[0].ToString();
row["BAR"] = code[1].ToString();
row["LAUNDRY"] = code[2].ToString();
row["ROOMSERVICE"] = code[3].ToString();
row["SAFEDEPBOX"] = code[4].ToString();
row["PARKING"] = code[5].ToString();
row["SWIMMING"] = code[6].ToString();
row["INTERNET"] = code[7].ToString();
row["GYM"] = code[8].ToString();
row["AIRCONDITION"] = code[9].ToString();
row["BUSINESSCENTER"] = code[10].ToString();
row["MEETINGROOMS"] = code[11].ToString();
row["SPA"] = code[12].ToString();
row["PET"] = code[13].ToString();
}
the above code i used to store each cell value as a new column in table and queried as per my requirement