Compute method abstract // Summary: // calculates the given expression on the current row that is used to pass the filtering condition. //// Parameter: // expression: // The expression to be calculated. //// Filter: // filter of the rows to be computed in the expression. //// Return result: // system. Object, set as calculation result. Public object compute (string expression, string filter );
This error is often encountered when datatable. Compute () is used.
After query, it is found that child is computed using able. Compute () with a parent-child relationship, and data in my datatable has no parent-child relationship at all.
After many confusions, the following is a summary:
1. The column name in the expression parameter cannot start with a number. Otherwise, this error is reported. (This is hard to find out ...)
2. The data type of the field in the expression parameter. For example, sum (character type) will report this error.
Is this a Microsoft Bug? The same error is reported in both cases.