My sqlQuery = string sql = "SELECT StoreType from location where locationId in (@pRowValue) order by region, district, locationId";
This is my code:
string storeNum = "";
foreach (DataRow row in dt.Rows)
{
storeNum += row["store"] + ",";
//storeNum += string.Format(@"'{0}',", row["store"]);
}
storeNum = storeNum.Remove(storeNum.LastIndexOf(','));
SqlDataAdapter da = new SqlDataAdapter(sql, con);
da.SelectCommand.Parameters.AddWithValue("@pRowValue", storeNum);
da.Fill(dtStoreType);
but I do not get any records back?

Nilesh ShahRank #42 · 34.2K reputationPosted Jun 30, 2017, 2:16 PM EDT
Devendra KumarRank #2,966 · 487 reputationPosted Jun 30, 2017, 11:57 PM EDT
Nepethya RanaRank #4,361 · 348 reputationPosted Jul 5, 2017, 7:18 PM EDT