社区
语言基础/算法/系统设计
帖子详情
ApplyUpdates(0)保存数据时报unable to find record! no key specified!
hg_delphi
2011-12-09 03:29:23
datasetprovider 的updatemode 为 upWhereAll,resolvetodataset为false,
修改clientdataset数据,并applyupdates(0),就报unable to find record! no key specified! 这个错误,不知什么原因,请高手指点 !
...全文
233
6
打赏
收藏
ApplyUpdates(0)保存数据时报unable to find record! no key specified!
datasetprovider 的updatemode 为 upWhereAll,resolvetodataset为false, 修改clientdataset数据,并applyupdates(0),就报unable to find record! no key specified! 这个错误,不知什么原因,请高手指点 !
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
6 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
BambooCaep
2011-12-11
打赏
举报
回复
那就建一个自增长字段呗。
hg_delphi
2011-12-09
打赏
举报
回复
[Quote=引用 2 楼 bamboocaep 的回复:]
建议不用upWhereAll,而用upWhereKeyOnly
[/Quote]
问题是我的表没有关键字段呀!
应该怎样设置pfInKey属性呀
kaikai_kk
2011-12-09
打赏
举报
回复
if clientdataset.ChangeCount>0 then
clientdataset.applyupdates(0);
BambooCaep
2011-12-09
打赏
举报
回复
updatemode 为 upWhereAll时,如果两条记录的内容一样,so......
BambooCaep
2011-12-09
打赏
举报
回复
建议不用upWhereAll,而用upWhereKeyOnly
BambooCaep
2011-12-09
打赏
举报
回复
需要一个内容唯一的字段,在其ProviderFlags里设置pfInKey。
Delphi7.1 Update
Delphi 7.1 Update Release Notes=======================================================This file contains important supplemental and late-breakinginformation that may not appear in the main productdocumentation, and supersedes information contained in otherdocuments, including previously installed release notes.Borland recommends that you read this file in its entirety.NOTE: If you are updating a localized version of Delphi 7, visit the Borland Registered User web site to obtain a localized readme file that may contain important late- breaking information not included in this readme file.IMPORTANT: Delphi must be closed before installing this update. =====================================================CONTENTS * INSTALLING THIS UPDATE * UPDATING LOCALIZED VERSIONS OF DELPHI 7 * KNOWN ISSUES * ISSUES ADDRESSED BY THIS UPDATE - IDE - CORE DATABASE - DATASNAP - DBGO (ADO COMPONENTS) - dbExpress - dbExpress COMPONENTS AND DB VCL - dbExpress CORE DRIVER AND METADATA - dbExpress VENDOR ISSUES - dbExpress CERTIFICATION - WEB SNAP - ACTIVEX - COMPILER - RTL - VCL - THIRD PARTY - BOLD FOR DELPHI * VERIFYING THAT THE UPDATE WAS SUCCESSFUL * FILES INSTALLED BY THIS UPDATE =======================================================INSTALLING THIS UPDATE* This update can not be applied to Delphi 7 Architect Trial version. * This update can not be removed after it is installed.* You will need the original Delphi 7 installation CD available to install this update.* To install this update from the CD, insert the CD, and launch the d7_ent_upd1.exe file appropriate for your locale.* To install this update from the Web, double-click the self-executing installation file and follow the prompts. * The Delphi 7 documentation PDF files are available on the update CD.========================================================UPDATING LOCALIZED VERSIONS OF DELPHI 7* This update can be applied only to the English version of Delphi 7. There are separate
updates
for the German, French and Japanese ver
Unable
to find
record
. No
key
specified
错误解决
"
Unable
to find
record
. No
key
specified
错误解决如果表有主键,在ClientDataSet 里主键字段的ProviderFlag属性设为pfIn
Key
OK 不过,在DBExpress里,使用SQL DataSet 和SQL Query 组件的话,SQL语句里的表名用大写,不然会出Table Unknow的错。让我郁闷了好几天
delphi错误‘
Unable
to find
record
. No
key
specified
’‘解决办法注意事项。
1.使用clientdataset的设置事件的响应: procedure TDataModule2.ClientDataSet1AfterPost(DataSet: TDataSet); begin Try TClientDataSet(DataSet).
Apply
Updates
(-1); Except TClientDataSet(DataSet).CancelU
Midas三层结构中“
Unable
to find
record
. No
key
specified
”错误分析及解决方案
当你使用sql语句打开一个表后,所有的Field的ProviderFlag是[ptInWhere,ptInUpdate] provider来生成sql语句是参考的是其Dataset属性设置的TDataset的Field,即AdoQuery,于是我修正了这个错误,看到正确的where子句被提交到
数据
库,爽.. with FProvider.DataSet.FieldByName( pkField
"
Unable
to find
record
. No
key
specified
"错误分析及解决办法
用midas已经很久了,昨天看了一些midas的源码,有点心得,下面写一下如何开发一个请求响应模式的midas系统系统的结构 client端的ClientDataset直接连接Server端的Provider,可以构成最简单的Midas系统,但是这种系统的缺点是很明显的,1.需要在Client上注册appserver,就算你发现了可以写注册表,解决这个问题,仍然增加了部署的复杂性2.系
语言基础/算法/系统设计
16,748
社区成员
33,247
社区内容
发帖
与我相关
我的任务
语言基础/算法/系统设计
Delphi 语言基础/算法/系统设计
复制链接
扫一扫
分享
社区描述
Delphi 语言基础/算法/系统设计
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章