[100分在线等]如何指定OracleDataAdapter的InsertCommand、UpdateCommand等,才能使用Update(DataTable)方法? 如题 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 SqlCommand selectcmd = new SqlCommand("select * from xxxx",con); //xxx为需要更新的表名SqlDataAdapter da = new SqlDataAdapter(selectcmd);SqlCommandBuilder builder = new SqlCommandBuilder(da);da.SelectCommand = selectcmd;da.UpdateCommand = builder.GetUpdateCommand();da.InsertCommand = builder.GetInsertCommand();da.DeleteCommand = builder.GetDeleteCommand();da.Update(ds);//ds为你的记录集 关于前台发送JSON字符串,后台.CS怎样接收? 字符串变整型 GridView的RowUpdating事件 请问开发https的网页和开发http的网页有何区别? 怎样将个人PC配置成服务器,使用ASP.NET 在MDI类型的winform中,怎么判断一个窗口已打开!若已打开,则把它置最上层! 求正则表达式 如何删除文件? 请问怎么禁止vs.net自动插入html语句? 数据连接问题 模版列里单元格的样式 水晶报表这么挂在IIS下面, 做过的,给点详细步骤
SqlDataAdapter da = new SqlDataAdapter(selectcmd);
SqlCommandBuilder builder = new SqlCommandBuilder(da);
da.SelectCommand = selectcmd;
da.UpdateCommand = builder.GetUpdateCommand();
da.InsertCommand = builder.GetInsertCommand();
da.DeleteCommand = builder.GetDeleteCommand();
da.Update(ds);//ds为你的记录集