62,072
社区成员
发帖
与我相关
我的任务
分享
public DataSet UpdateDs(string _strSql, DataSet changedDs, string tableName)
{
try
{
SqlDataAdapter da = new SqlDataAdapter(_strSql, GetConn());
SqlCommandBuilder sb = new SqlCommandBuilder(da);
da.Update(changedDs, tableName);
changedDs.AcceptChanges();
}
catch (Exception ex)
{
throw new Exception(ex.Message);//, "数据库更新失败");
}
}