是这样我用vs2008 建立了一个form窗体 利用vs提供的数据源操作 将表添到了窗体上,现在调试时报错 保存按钮代码
 private void customersBindingNavigatorSaveItem_Click(object sender, EventArgs e)
        {
               this.Validate();
            
                this.customersBindingSource.EndEdit();
                this.tableAdapterManager.UpdateAll(this.testDataSet);  //发生错误行
            
        }错误是Update requires a valid UpdateCommand when passed DataRow collection with modified rows.

解决方案 »

  1.   

    代码拿过来SEE SEE 
    好像是说无效的操作方法对列的操作
    我们帮忙调试下看看就知道了。
      

  2.   

    检查 UpdateCommand 
    其中的sql语句
      

  3.   

    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Windows.Forms;namespace Data
    {
        public partial class Form1 : Form
        {
            public Form1()
            {
                InitializeComponent();
            }        private void customerBindingNavigatorSaveItem_Click(object sender, EventArgs e)
            {
                this.Validate();
                this.customerBindingSource.EndEdit();
                this.tableAdapterManager.UpdateAll(this.testDataSet);        }        private void Form1_Load(object sender, EventArgs e)
            {
                // TODO: 这行代码将数据加载到表“testDataSet.customer”中。您可以根据需要移动或移除它。
                this.customerTableAdapter.Fill(this.testDataSet.customer);        }
        }
    }
    这是保存按钮上的代码