为了支持数据库更新, 我们可以使用SqlCommandBuilder自动生成DataAdapter的InsertCommand, UpdateCommand, 和DeleteCommand属性。 为了支持自动生成, 指定的SelectCommand必须包含主键或唯一性列。如果没有, 则无法生成InsertCommand, UpdateCommand, 和DeleteCommand,并会抛出InvalidOperation异常。关于更详细的信息和例程,请参看以下网页:
Q316758 DOC: Error in SqlCommandBuilder Code Sample
http://support.microsoft.com/support/kb/articles/q316/7/58.aspQ310128 INFO: When to Use FillSchema and MissingSchemaAction
http://support.microsoft.com/support/kb/articles/q310/1/28.asphttp://msdn.microsoft.com/library/en-us/cpguide/html/cpconautomaticallygeneratedcommands.asp
Q316758 DOC: Error in SqlCommandBuilder Code Sample
http://support.microsoft.com/support/kb/articles/q316/7/58.aspQ310128 INFO: When to Use FillSchema and MissingSchemaAction
http://support.microsoft.com/support/kb/articles/q310/1/28.asphttp://msdn.microsoft.com/library/en-us/cpguide/html/cpconautomaticallygeneratedcommands.asp
解决方案 »
- 一个老问题了,webbrowser怎样才能屏蔽弹出的脚本错误提示,网上的都不行,我是.net4.0,哪位大仙有妙招?
- 【高手】如何让 C# 控制台程序重复执行并且能够响应响应的事件处理 寻求最优解送100
- picturebox图片替换 数据库的存取
- 高分(100分)求正版windows帮忙去微软下点东西
- 算法问题???
- 问个关于表中取值的问题.
- new Bitmap(Int32, Int32, Int32, PixelFormat, IntPtr)是否和Intptr参数共享数据内存?
- 初学C#,各位大侠,给些建议,小弟不胜感激!来者有分!
- 现在有有个显示用的表格(用datagrid控件显示),我想点击其中任意一小表格,然后返回该表格所对应的列名以及行号和它本身的数值,也就是
- 病毒!病毒!
- 请教个我认为比较难的问题 高手请金
- 求助:抓取代理IP的代码
datagrid1.update();
grid.BindingContex[dataset,"表名"].EndCurrentEndit();