惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Jina AI
Jina AI
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
有赞技术团队
有赞技术团队
罗磊的独立博客
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
U
Unit 42
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Recent Announcements
Recent Announcements
Y
Y Combinator Blog
Vercel News
Vercel News
Martin Fowler
Martin Fowler
V
V2EX
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
L
LangChain Blog
云风的 BLOG
云风的 BLOG
H
Hackread – Cybersecurity News, Data Breaches, AI and More
aimingoo的专栏
aimingoo的专栏
G
Google Developers Blog
The GitHub Blog
The GitHub Blog
N
Netflix TechBlog - Medium
Google DeepMind News
Google DeepMind News
雷峰网
雷峰网
阮一峰的网络日志
阮一峰的网络日志
F
Fortinet All Blogs

博客园 - 武广敬

There is no mode by that name loaded / mode not given 产生原因(个案) 使用VS调试JS 使用U盘安装Windows Server2008 德广火车票助手登录12306代码详解-登录 德广火车票助手源码 请各位前辈给些建议 用户中心 - 博客园 vs2008 SmartDevice 程序 访问Internet时出错 提示:未能建立与网络的连接。解决方案 免费的网上问卷调查程序 在线HTML标签验证工具.很好用的. 微软扶持软件公司计划 使用Visual Studio生成安装程序并设定连接字符串及其他自定义操作. - 武广敬 - 博客园 新鲜出炉的Asp.Net MVC电子书 我理解的云计算 设定了窗口的AcceptButton及CancelButton点击时无动作的原因 使用电脑+MODEM 订火车票 (可以一直自动重拨) 黄牛党/铁路内部人员不得进入!!! UI设计注意点 可以让DataGridView中多个ComboBox级联的工具类-初版 通过反射得到对象 DataGridViewComboBoxColumn 可以让用户输入并自动匹配选项的问题 [问了很多人,找了很多站都没得到答案,所以只好放首页,请管理员体谅.谢谢!]
关于微软有自增列父子表更新程序的问题
武广敬 · 2009-10-22 · via 博客园 - 武广敬

有一些不明白它的意思.请高手详细说明一下原由.谢谢!
来源网址:http://support.microsoft.com/?scid=kb%3Bzh-cn%3B320301&x=11&y=15


        
protected static void OnDetailsRowUpdated(object sender, SqlRowUpdatedEventArgs args)
        {
            
if(args.StatementType == StatementType.Insert )
            {
                
// Do not allow the AcceptChanges to occur on this row.
                args.Status = UpdateStatus.SkipCurrentRow;//这里为什么要用UpdateStatus.SkipCurrentRow// Get the current, actual primary key value so that you can plug it back
                
// in after you get the correct original value that was generated for the child row.
                int currentkey = (int)args.Row["OrderID"];
                
// This is where you get a correct original value key that is stored to the child row. 
                
// You pull the original, pseudo key value from the parent, plug it in as the child row's primary key
                
// field, and then accept changes on it. Specifically, this is why you turned off EnforceConstraints.
                args.Row["OrderID"= args.Row.GetParentRow("OrdDetail")["OrderID",DataRowVersion.Original];
                args.Row.AcceptChanges();
//上面用了UpdateStatus.SkipCurrentRow,这里为什么还要AcceptChanges(),感觉矛盾.
                
// Store the actual primary key value in the foreign key column of the child row.
                args.Row["OrderID"= currentkey;//为什么又改回原来的值???
            }if(args.StatementType == StatementType.Delete )
                args.Status 
= UpdateStatus.SkipCurrentRow;//这里也不明白它的用意.