Dim myadapter As New SqlDataAdapter(sqlstr, Conn)Dim ds As New DataSetmyadapter.Fill(ds, "price") '在最后添加Dim rh As DataRowrh = ds.Tables("price").NewRowrh.Item(0) = "合计:"rh.Item("金额") = ds.Tables("price").Compute("sum(金额)", "")ds.Tables("price").Rows.Add(rh) '插入到指定行Dim newRow As DataRow = Tables("price").NewRow();newRow("字段") = "内容1";newRow("字段") = "内容2";Tables("price").Rows.InsertAt(newRow, a); 'a为要插入的行号(int型)