如何将datatable中的数据插入到数据库中的表A中,有人知道吗?
解决方案 »
- 请高手指教Stream 转换成string的速度怎么提高
- 单用户--升级--多用户--表怎么设计
- VS2005中的自动提示出不来?
- 用c#编写手机拼音输入法问题?多谢指教
- dataset最多可以存放多少条数据?
- 存储过程转换int总是错误?
- 关于自定义控件使用的问题
- 水晶报表转换成excel时出现的问题?
- OnPaint问题,当我使用DrawButton时,发现画出来的背景色只能是灰色,如何画出其他颜色的背景色
- .net页面中还支持javascript吗?
- this.dataGridView1.Columns[ ShipDate ].DefaultCellStyle.Format = N2 无效
- 求B/s系统的操作日志设计思路
DataTable批量插入数据库
SqlCommand conn = con.CreateCommand();
string inser = "select a_activityName, a_activityDescribe,a_activityStartTime" +
",a_activityEndTime" +
", a_activityId from tb_activity ta where a_deleteActivity = 0 ";
SqlDataAdapter sda = new SqlDataAdapter(inser, con);
DataSet ds = new DataSet();
sda.Fill(ds);
dataGridView1.DataSource = ds.Tables[0];