绑定两个更新表-SQL Server 2008 [英] Binding two tables on update - SQL Server 2008

查看:104
本文介绍了绑定两个更新表-SQL Server 2008的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

//This code raises an foreign key violation error on the people table.

private void masterTableBindingNavigatorSaveItem_Click(object sender, EventArgs e)
        {
            this.Validate();
            this.masterTableBindingSource.EndEdit();
            this.peopleBindingSource.EndEdit();
            this.tableAdapterManager.UpdateAll(this.clientsDS);

        }
//this code corrects problem, but shouldn't be necessary.

private void peopleDataGridView_Enter(object sender, EventArgs e)
        {
            this.Validate();
            this.masterTableBindingSource.EndEdit();
            this.masterTableTableAdapter.Update(clientsDS.MasterTable);
        }


我缺少什么?


What am I missing?

推荐答案

查看此链接
http://www.mssqltips.com/tip.asp?tip=1692 [ ^ ]可能对您有帮助
see this link
http://www.mssqltips.com/tip.asp?tip=1692[^] it may help u


这篇关于绑定两个更新表-SQL Server 2008的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆