hi i have two datatables from which i am manipulating data in on my .aspx page and i am using Devlys 010 font, so its obvious that my database contains every possible special char including single quotes, it works fine but the problem come with datatable where it gives errors like:Missing operand after ... on special charsi tried ` and [] but in vain here is the code:\[code\]DataTable dt = new DataTable(); dt.Columns.Add("mis_groupID", typeof(string)); dt.Columns.Add("farmer", typeof(string)); dt.Columns.Add("farmer_cast", typeof(string)); dt.Columns.Add("farmer_village", typeof(string)); dt.Columns.Add("farmer_panchayat", typeof(string)); dt.Columns.Add("farmer_district", typeof(string)); dt.Columns.Add("cast_category", typeof(string)); dt.Columns.Add("other_category", typeof(string)); dt.Columns.Add("gender", typeof(string)); dt.Columns.Add("crop_name", typeof(string)); dt.Columns.Add("drip_minispacing", typeof(string)); dt.Columns.Add("brand_name", typeof(string)); dt.Columns.Add("field_area", typeof(string)); dt.Columns.Add("group_num", typeof(string)); dt.Columns.Add("dealer", typeof(string)); dt.Columns.Add("bill_date", typeof(string)); dt.Columns.Add("bill_amount", typeof(string)); dt.Columns.Add("reg_date", typeof(string)); dt.Columns.Add("given_subsidy", typeof(string)); dt.Columns.Add("subsidy", typeof(string)); dt.Columns.Add("reg_no", typeof(string)); SqlConnection conn; SqlCommand cmd; SqlDataReader dread; conn = new SqlConnection(WebConfigurationManager.ConnectionStrings["conn"].ConnectionString); conn.Open(); cmd = conn.CreateCommand(); cmd = new SqlCommand(Sqlgrd.SelectCommand, conn); cmd.CommandType = CommandType.Text; cmd.Parameters.AddWithValue("@dealer", _ddDealer.SelectedItem.Text); dread = cmd.ExecuteReader(); while (dread.Read()) { DataRow row = dt.NewRow(); row["mis_groupID"] = dread[0].ToString(); row["farmer"] = dread[1].ToString() + " " + dread[2].ToString() + " " + dread[4].ToString(); row["farmer_cast"] = dread[3].ToString(); row["farmer_village"] = dread[5].ToString(); row["farmer_panchayat"] = dread[6].ToString(); row["farmer_district"] = dread[7].ToString(); row["cast_category"] = dread[8].ToString(); row["other_category"] = dread[9].ToString(); row["gender"] = dread[10].ToString(); row["crop_name"] = dread[11].ToString(); row["drip_minispacing"] = dread[12].ToString(); row["brand_name"] = dread[13].ToString(); row["field_area"] = dread[14].ToString(); row["group_num"] = dread[15].ToString(); row["dealer"] = dread[16].ToString(); row["bill_date"] = dread[17].ToString(); row["bill_amount"] = dread[18].ToString(); row["reg_date"] = dread[19].ToString(); row["given_subsidy"] = dread[20].ToString(); row["subsidy"] = dread[21].ToString(); row["reg_no"] = dread[22].ToString(); dt.Rows.Add(row); } dread.Close(); cmd.Dispose(); cmd.Parameters.Clear(); conn.Close(); #endregion #region gridRebuilder DataTable dt_New = new DataTable(); dt_New.Columns.Add("mis_groupID", typeof(string)); dt_New.Columns.Add("Group_Persons", typeof(string)); dt_New.Columns.Add("farmer_cast", typeof(string)); dt_New.Columns.Add("farmer_village", typeof(string)); dt_New.Columns.Add("farmer_panchayat", typeof(string)); dt_New.Columns.Add("farmer_district", typeof(string)); dt_New.Columns.Add("cast_category", typeof(string)); dt_New.Columns.Add("other_category", typeof(string)); dt_New.Columns.Add("gender", typeof(string)); dt_New.Columns.Add("crop_name", typeof(string)); dt_New.Columns.Add("drip_minispacing", typeof(string)); dt_New.Columns.Add("brand_name", typeof(string)); dt_New.Columns.Add("field_area", typeof(string)); dt_New.Columns.Add("group_num", typeof(string)); dt_New.Columns.Add("dealer", typeof(string)); dt_New.Columns.Add("bill_date", typeof(string)); dt_New.Columns.Add("bill_amount", typeof(string)); dt_New.Columns.Add("reg_date", typeof(string)); dt_New.Columns.Add("given_subsidy", typeof(string)); dt_New.Columns.Add("subsidy", typeof(string)); dt_New.Columns.Add("reg_no", typeof(string)); int Counter = 1; //dt_New Datatable get data from Database. foreach (DataRow dr in dt.Rows) { DataRow dr_New = dt_New.Select("mis_groupID='`" + dr["mis_groupID"].ToString() + "`' and farmer_cast='`" + dr["farmer_cast"].ToString() + "`'" + " and farmer_village='`" + dr["farmer_village"].ToString() + "`'" + " and farmer_panchayat='`" + dr["farmer_panchayat"].ToString() + "`'" + " and farmer_district='`" + dr["farmer_district"].ToString() + "`'" + " and cast_category='`" + dr["cast_category"].ToString() + "`'" + " and other_category='`" + dr["other_category"].ToString() + "`'" + " and gender='`" + dr["gender"].ToString() + "`'" + " and crop_name='`" + dr["crop_name"].ToString() + "`'" + " and drip_minispacing='`" + dr["drip_minispacing"].ToString() + "`'" + " and brand_name='`" + dr["brand_name"].ToString() + "`'" + " and field_area='`" + dr["field_area"].ToString() + "`'" + " and group_num='`" + dr["group_num"].ToString() + "`'" + " and dealer='`" + dr["dealer"].ToString() + "`'" + " and bill_date='`" + dr["bill_date"].ToString() + "`'" + " and bill_amount='`" + dr["bill_amount"].ToString() + "`'" + " and reg_date='`" + dr["reg_date"].ToString() + "`'" + " and given_subsidy='`" + dr["given_subsidy"].ToString() + "`'" + " and subsidy='`" + dr["subsidy"].ToString() + "`'" + " and reg_no='`" + dr["reg_no"].ToString() + "`'").FirstOrDefault(); if (dr_New != null) { dr_New["Group_Persons"] = dr_New["Group_Persons"].ToString() + "] `" + dr["farmer"].ToString()+"`"; } else { DataRow newRow = dt_New.NewRow(); // newRow["Sr_no"] = Counter.ToString(); newRow["Group_Persons"] = dr["farmer"].ToString(); newRow["mis_groupID"] = dr["mis_groupID"].ToString(); newRow["farmer_cast"] = dr["farmer_cast"].ToString(); newRow["farmer_village"] = dr["farmer_village"].ToString(); newRow["farmer_panchayat"] = dr["farmer_panchayat"].ToString(); newRow["farmer_district"] = dr["farmer_district"].ToString(); newRow["cast_category"] = dr["cast_category"].ToString(); newRow["other_category"] = dr["other_category"].ToString(); newRow["gender"] = dr["gender"].ToString(); newRow["crop_name"] = dr["crop_name"].ToString(); newRow["drip_minispacing"] = dr["drip_minispacing"].ToString(); newRow["brand_name"] = dr["brand_name"].ToString(); newRow["field_area"] = dr["field_area"].ToString(); newRow["group_num"] = dr["group_num"].ToString(); newRow["dealer"] = dr["dealer"].ToString(); newRow["bill_date"] = dr["bill_date"].ToString(); newRow["bill_amount"] = dr["bill_amount"].ToString(); newRow["reg_date"] = dr["reg_date"].ToString(); newRow["given_subsidy"] = dr["given_subsidy"].ToString(); newRow["subsidy"] = dr["subsidy"].ToString(); newRow["reg_no"] = dr["reg_no"].ToString(); dt_New.Rows.Add(newRow); Counter++; } } grdAS.DataSource = dt_New; grdAS.DataBind(); #endregion\[/code\]