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?
Nepethya RanaPosted Jul 5, 2017, 11:18 PM
Devendra KumarPosted Jul 1, 2017, 3:57 AM
Nilesh ShahPosted Jun 30, 2017, 6:16 PM