zoukankan
html css js c++ java
LoadDataRow应用例子
public
void
ExecuteInsert()
{
SqlConnection con
=
new
SqlConnection(
"
server=(local);uid=sa;pwd=sa;database=HljCost
"
);
SqlDataAdapter da
=
new
SqlDataAdapter(
"
SELECT * FROM [Manager]
"
,con);
da.MissingSchemaAction
=
MissingSchemaAction.AddWithKey;
SqlCommandBuilder cb
=
new
SqlCommandBuilder(da);
DataSet ds
=
new
DataSet();
da.Fill(ds);
DataRow dr
=
ds.Tables[
0
].NewRow();
dr[
"
MID
"
]
=
0
;
dr[
"
MuserID
"
]
=
2
;
dr[
"
Mpass
"
]
=
3
;
dr[
"
Type
"
]
=
1
;
ds.Tables[
0
].BeginLoadData();
ds.Tables[
0
].LoadDataRow(dr.ItemArray,
false
);
ds.Tables[
0
].EndLoadData();
this
.Response.Write(da.Update(ds.Tables[
0
]));
}
查看全文
相关阅读:
imx6 关闭调试串口
imx6 Image Vector Table (IVT)
imx6 DDR_Stress_Test
java安装1.8和1.7,报错:Error: Registry key 'SoftwareJavaSoftJava Runtime Environment'CurrentVers
maven安装与环境变量配置
14.商品添加功能
MyBatis 接口的使用
MyBatis 的缓存机制
MyBatis 别名标签 & sql的复用
MyBatis 多表查询
原文地址:https://www.cnblogs.com/ejiyuan/p/968670.html
最新文章
Synchronizer解析(为AQS打个铺垫)
IntricCondition和expliciteCondition比较
intrinsicConditionQueue笔记
CentOS7 安装 hbase1.3.3
kafka producer实例
linux IO 内核参数调优 之 原理和参数介绍
linux pagecache与内存占用
spring boot系列博客
CentOS7 安装kafka集群
Web api Json 接受的参数类型为父类,自动序列化为子类的过程
热门文章
make install 时指定安装路径
C++删除容器数据
CentOS 7 安装Python3.7
android jni aotf 错误
Linux ad7606 驱动
linux ad7606 驱动解读
/sys/kernel/debug/gpio
linux udev 自动挂载 SD卡/U盘
imx6 matrix keyboard
android 屏幕分辨率 更改
Copyright © 2011-2022 走看看