Gerard,
DataRow columns are objects. You need to cast it to an int before you attempt to add to it.
dr["num_nexta"] = (int)dr["num_nexta"] + 1;
~~Bonnie
>Hi.
>I am trying to add 1 to a datarow field as follows:
>
>dr["num_nexta"] = dr["num_nexta"] + 1;
>
>.. it comes up with an eror : Operator + cannot be applied to operannds of type object and int
>
>however :
>
>dr["num_nexta"] = 123 is ok.
>
>Anybody know what I am doing wrong ?
>
>regards,
>
>Gerard