zoukankan
html css js c++ java
添加新行到DataSet
Dim
myadapter
As
New
SqlDataAdapter(sqlstr, Conn)
Dim
ds
As
New
DataSet
myadapter.Fill(ds,
"
price
"
)
'
在最后添加
Dim
rh
As
DataRow
rh
=
ds.Tables(
"
price
"
).NewRow
rh.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型)
查看全文
相关阅读:
[LeetCode]Search a 2D Matrix
[LeetCode]Trapping Rain Water
[LeetCode]Container With Most Water
[LeetCode]Permutations
[LeetCode]Missing Number
[LeetCode]Set Matrix Zeroes
[LeetCode]Find Peak Element
[LeetCode]Balanced Binary Tree
[LeetCode]Spiral Matrix II
[LeetCode]Spiral Matrix
原文地址:https://www.cnblogs.com/ryb/p/737177.html
最新文章
maven怎么更改本地仓库
目标文件格式
生死攸关的的一环:创业公司如何找准定位
Break on _NSLockError() to debug.
wifi 3G 流量
UIWebView 使用要注意的几点
iOS 6 Passbook 入门 1/2
iOS拨打电话(三种方法)
android图片加水印,文字
ARC属性中还能使用assign,copy,retain这些关键字吗
热门文章
苹果所有常用证书,appID,Provisioning Profiles配置说明及制作图文教程(精)
使用Primose方式解决异步编程回调的一些问题--animate动画的例子
Mongoose学习(3)--设置环境变量
Mongoose学习(2)
Mongoose学习(1)
Javascript
[自动化平台系列]
[自动化平台系列]
imagemap的推荐使用方法,前端自适应image maps库
前端photoshop 切图神器cutterman
Copyright © 2011-2022 走看看