dw --其实这个东东有时候我还真的捉摸不透

sharpenabc 2008-03-21 10:51:25
正常情况下dw在retrieve 一次后,如果不用reset,再次retrieve时,此时dw的数据窗口的数据会翻倍,如果用啦reset一切就没问题,再次retrieve,primary区显示数据就正常.不知怎么回事,我有时也遇到过这样的现像,明明dw没有reset,但是再次retrieve,此时primary区的数据不会翻倍,出现这样的问题究竟是什么情形导致的?有哪些情形会使这种不正常的现像产生? 在线期求大家的明释,谢谢啦!
...全文
104 10 打赏 收藏 转发到动态 举报
写回复
用AI写文章
10 条回复
切换为时间正序
请发表友善的回复…
发表回复
AFIC 2008-03-21
  • 打赏
  • 举报
回复
蹭点分
hangzhou6274 2008-03-21
  • 打赏
  • 举报
回复
我不是高手,所以没碰到过个这问题。不过楼上很多人都已经回答了你这个问题
v888 2008-03-21
  • 打赏
  • 举报
回复
PB的帮助文件解释的很清楚了·
更新的是主缓冲区的数据
当你调用retrieve时,数据窗口已存在的行会被丢弃且会被retrieve后的行覆盖
在dw的retrievestart事件中return 2 ,更新的行会被累加到数据窗口中
v888 2008-03-21
  • 打赏
  • 举报
回复
retrieve

Returns the number of rows displayed (that is, rows in the primary buffer) if it succeeds and -1 if it fails. If there is no DataWindow object assigned to the DataWindow control or DataStore, this method returns -1.


Normally, when you call Retrieve, any rows that are already in the DataWindow control or DataStore are discarded and replaced with the retrieved rows. You can return the code 2 in the RetrieveStart event to prevent this. In this case, Retrieve adds any retrieved rows to the ones that already exist in the buffers.

I_am_Z 2008-03-21
  • 打赏
  • 举报
回复
从没有遇到这样的情况。不过可以制造这样的场景。建议查看下dw容器控件的RetrieveStart 事件,正常情况下,当该事件如果加入代码return 2时,数据就会达到不清除而是追加检索。
青锋-SS 2008-03-21
  • 打赏
  • 举报
回复
数据窗口的retrievestart()事件中写如下代码,retrieve()时是累加的

return 2
青锋-SS 2008-03-21
  • 打赏
  • 举报
回复
楼上正解
jlwei888 2008-03-21
  • 打赏
  • 举报
回复
正常是不会这样的!
你做个新的试试就知道了!
正常是 当retrieve时,原数据会清空!
但在 retrievestart 事件中 return 2 就不清原数据了!

sharpenabc 2008-03-21
  • 打赏
  • 举报
回复
是不是论坛BUG啊,版主,我自己的贴子,直接打开只看到我个人的内容,明明有人回复也看不到, 但是我再次回复的时候却又可以看到别人回复的内容啦,以前可不是这个样子的!
sharpenabc 2008-03-21
  • 打赏
  • 举报
回复
请问群主,我发的贴子,上面明明显示8个回复,为什么却看不到回复的内容呢?

1,079

社区成员

发帖
与我相关
我的任务
社区描述
PowerBuilder 相关问题讨论
社区管理员
  • 基础类社区
  • WorldMobile
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧