views:

348

answers:

1

the following code

Dim dc = New DataColumn(name, GetType(Double), "[col1] ^ [col2]")

produces the following error:

The expression contains unsupported operator '^'.

Is this right, is the power operand not support in datacolumn expressions???

Anyone have an idea how i'd write this?

A: 

Yes. it is not supported.

You could use RowChanging event of DataTable to set the value of the new column using c#.

shahkalpesh
Yup, i already implemented a manual update but this sure feels like a hack to me. Also, on small tables it's OK, but updating 100000+ records takes a big hit...
Graham

related questions