返回首页

您好,
我要更新一个表,称为title_edit
我与设计师创造了3个更新查询,
现在,当我在测试设计执行更新查询表得到更新,没有P roblems
但是当我尝试从形式更新无法更新

我有3组合框多维数组,
组合框是分级与第一列中的字符串,我要保存的字符串表,从第二列

private void button1_Click(object sender, EventArgs e)

        {

            this.Validate();

            this.title_editBindingSource.EndEdit();

            if (comboBox1.SelectedIndex > 0) this.title_editTableAdapter.Updatefontsize(size[1,comboBox1.SelectedIndex]); 

            if (comboBox2.SelectedIndex > 0)  this.title_editTableAdapter.Updatefontcolor(color[1, comboBox2.SelectedIndex]);

            if (comboBox3.SelectedIndex > 0)  this.title_editTableAdapter.Updatefontfamily(font[1, comboBox3.SelectedIndex]);

        }

 

        private void button2_Click(object sender, EventArgs e)

        {

            this.Validate();

            this.title_editBindingSource.EndEdit();

            this.title_editTableAdapter.Updatefontsize(size[1, 3]);

            this.title_editTableAdapter.Updatefontcolor("#000000");

            this.title_editTableAdapter.Updatefontfamily("arial,helvetica,sans-serif");

           

            MessageBox.Show("Loaded Default Settings");

        }

这两个按钮,不要做任何事情

查询看起来像这样:

{C}
我使用VS2010的

回答

评论会员: 时间:2
T