Hello friend, it seems like you are getting datatype mismatch error as you're trying to concatenate string with an integer value. Try to convert the integer value to string as shown below:
for (i = 0; i < k; i++)
{
if (i==0)
s = sqlStr+"ID="+id[k].ToString();
else
s = sqlStr+"and ID="+id[k].ToString();
}
- DD