S
spp
I want to UPDATE a SQL table with a SqlCommand
The Update command is
UPDATE mytable SET col1 = @param1 WHERE STR(intcolumn,6,0) IN (@param2)
My questions are
what type of parameter should be @param2 to satisfy my update because
intcolumn is an int column and I populate @param2
with a loop like
foreach (int index in GridView1.GetSelectedIndices()
{
string key = (string)GridView1.DataKeys[index].value.ToString();
mysearchlist += "'"+key+"'"+","
}
and @param have the value of mysearchlist.SubString(0,
mysearchlist.Length -1)
The Update command is
UPDATE mytable SET col1 = @param1 WHERE STR(intcolumn,6,0) IN (@param2)
My questions are
what type of parameter should be @param2 to satisfy my update because
intcolumn is an int column and I populate @param2
with a loop like
foreach (int index in GridView1.GetSelectedIndices()
{
string key = (string)GridView1.DataKeys[index].value.ToString();
mysearchlist += "'"+key+"'"+","
}
and @param have the value of mysearchlist.SubString(0,
mysearchlist.Length -1)