System.Data.AggregateNode is not an aggregate error

B

bradmofo

This is for ado.net 2.0.

I have a dataset with two tables that have a parent-child relationship.
I am trying to sum the sum the values of a child column using:

myDs.parent_table.Compute("sum(Child(parent_table_child_table).column_to_sum)","")

Where parent_table_child_table is the relationship name, and
column_to_sum is a decimal type.

This is something I did lots of times with 1.1. I have double-checked
my syntax, and everything looks correct. Any ideas?

Here is the exception I get:

System.Data.EvaluateException was unhandled by user code
Message="Cannot evaluate. Expression 'System.Data.AggregateNode' is
not an aggregate."
Source="System.Data"
StackTrace:
at System.Data.AggregateNode.Eval(Int32[] records)
at System.Data.DataExpression.Evaluate(DataRow[] rows,
DataRowVersion version)
at System.Data.DataExpression.Evaluate(DataRow[] rows)
at System.Data.DataTable.Compute(String expression, String
filter)
at LienDetail.SavePage(MainDataSet ds) in c:\Documents and
Settings\bstiff\My Documents\Visual Studio
2005\WebSites\Pricing\LienDetail.aspx.cs:line 122
at LienDetail.cmbRate_SelectedIndexChanged(Object sender,
EventArgs e) in c:\Documents and Settings\bstiff\My Documents\Visual
Studio 2005\WebSites\Pricing\LienDetail.aspx.cs:line 180
at
System.Web.UI.WebControls.ListControl.OnSelectedIndexChanged(EventArgs
e)
at
System.Web.UI.WebControls.DropDownList.RaisePostDataChangedEvent()
at
System.Web.UI.WebControls.DropDownList.System.Web.UI.IPostBackDataHandler.RaisePostDataChangedEvent()
at System.Web.UI.Page.RaiseChangedEvents()
at System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top