这样数据窗如何查询?

xiaolei80000 2009-03-07 08:26:20
在datawindow中,有很多行和列,现在知道行数,查询已知行中具体的数。
...全文
77 10 打赏 收藏 转发到动态 举报
写回复
用AI写文章
10 条回复
切换为时间正序
请发表友善的回复…
发表回复
dawugui 2009-03-07
  • 打赏
  • 举报
回复
dw_1.setrow(已知行)
dw_1.scrolltorow(已知行)
dawugui 2009-03-07
  • 打赏
  • 举报
回复
getitemstring(已知行,col1)
getitemnumber(已知行,col2)
xiaolei80000 2009-03-07
  • 打赏
  • 举报
回复
关键是要查询的那个数在数据窗口里有很多相同的,相同的数它们对应的字段不相同啊!
hxbkkk 2009-03-07
  • 打赏
  • 举报
回复
不怕麻烦的话,所有列名列出来循环getitem,
xiaolei80000 2009-03-07
  • 打赏
  • 举报
回复
明确就是 在datawindow中模糊查找一个数。
TheLittlePrince 2009-03-07
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 sjq521521 的回复:]
查询已知行中具体的数。
没看明白
[/Quote]
同意楼上,什么叫已知行中具体的数啊?
xiaolei80000 2009-03-07
  • 打赏
  • 举报
回复
就是说 在数据窗中有很多数据,字段(列)不能确定,行能确定,我要模糊查到,我输入的那个数。
sjq521521 2009-03-07
  • 打赏
  • 举报
回复
查询已知行中具体的数。
没看明白
SKY_4K_PPM 2009-03-07
  • 打赏
  • 举报
回复
integer colcount
colcount=integer(dw_1.describe("datawindow.column.count"))
dw_1.find(col1_exp,1,dw_1.rowcount())
dw_1.find(col2_exp,1,dw_1.rowcount())
................................
dw_1.find(colcount_exp,dw_1.rowcount())
查就得了。。。。。。。。。。。
Allan_xd 2009-03-07
  • 打赏
  • 举报
回复
int li_col

for li_col = integer(object.datawindow.column.count) to 1 step -1
if getitemstring(ai_row/*代表指定的行*/,li_col) = '要查找的数据' then exit
end for
if li_col > 0 then
messagebox('查找结果','在第' + string(li_col) + '列上找到了匹配的数据')
else
messagebox('查找结果','数据未找到')
end if

609

社区成员

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

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