【发布时间】:2010-12-28 23:47:59
【问题描述】:
我在我的 C# 项目中使用 ADO.NET。在我的表单中,我从 VS2010 的工具箱中添加了一个 SourceBinding 元素。我将连接设置为我的数据集表。它会自动为我创建一个 DataAdapter。
我要插入一条记录,所以我调用DataAdapter 的Insert() 方法。但是当我查看我的数据库数据时,它没有任何新记录...
orderID = this.orderTableAdapter.Insert("", "",
(int)OrderStatus.IN_CONSTRUCTION, DateTime.Now);
还是需要用SqlCommand手动插入???
【问题讨论】: