即每一行的和 每一列的和

解决方案 »

  1.   

    比如添加一个Label1,让这个Label的值等于年龄大于20岁的人的平均年龄
    可以这么写
    this.Label1.Text=ds.Tables["table1"].Compute("avg(iAge)","iAge>20").ToString();
    Compute()方法第一个参数是 聚合函数 (比如sum,avg之类)第二个参数是条件
    上述代码基本等于select avg(iAge) from tb1 where iAge>20
      

  2.   

    hackate(~兰心*-*寒~ | 网站: http://www.7to.net) 
    能说具体点吗
    方便的话
      

  3.   

    this.Label1.Text=ds.Tables["table1"].Compute("avg(iAge)","iAge>20").ToString();
    精辟