超怪的问题!!!Datawindow的rowCount()和Retrieve()

kkbgp 2003-01-14 11:47:29
本人在调试程序中有如下代码
dw_juxiangluyou.SetTransObject(SQLCA)
ii=dw_juxiangluyou.Retrieve('000','099')
messagebox("",string(ii))

程序上应该一点问题没有,不过出现如下情况。
ii显示的值是9,而从数据窗口中数出来的是13,即使在窗口中使用dw_juxiangluyou.RowCount()也还是9,如果把光标移动10或11等,就是说超过总数9行后再使用dw_juxiangluyou.RowCount(),返回的是11行,搞不明白
另外插入一个datawindow控件之后使用该对象,显示的ii值又是5,没办法,重新创建datawindow后好象显示的才正确,请高手指点
...全文
50 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
tchatcha 2003-01-14
  • 打赏
  • 举报
回复
没见过,可能是你的datawindow坏了
luccy 2003-01-14
  • 打赏
  • 举报
回复
Retrieve method (DataWindows)

1.Return value
Returns the number of rows displayed (that is, rows in the primary buffer) if it succeeds and -1 if it fails.
2.Usage
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.
lyj007 2003-01-14
  • 打赏
  • 举报
回复
如果你那个错误的数据窗口还在的话,也许我能够找到你的问题所在,你给我加分吗???欢迎联系 QQ:27378211。
kkkkk2003 2003-01-14
  • 打赏
  • 举报
回复
只能说是你的数据窗口错误了
YewPu 2003-01-14
  • 打赏
  • 举报
回复
路过的,你重新生成或编译看一看。
bomber2001 2003-01-14
  • 打赏
  • 举报
回复
是否找不到其中字段
regenerate看看
kkbgp 2003-01-14
  • 打赏
  • 举报
回复
后来是重新做过就好了,但我想有没有人知道个中原由呀,多学点也好呀。
我觉得大家可能说出点思路就能明白的多一点
pandix 2003-01-14
  • 打赏
  • 举报
回复
datawindow坏了,重新做一个就正常行了

611

社区成员

发帖
与我相关
我的任务
社区描述
PowerBuilder DataWindow
社区管理员
  • DataWindow社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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