急啊,麻烦帮我看下例代码哪里有错啊?

thomashoo 2003-12-21 11:03:18
dwItemStatus l_status
l_status=dw_1.GetItemStatus(dw_1.GetRow(),dw_1.GetColumn(),Primary!)
if l_status=DataModified! then.......
我在 l_status 处设了个breakpoint,然后运行调试,可是当我修改某行中某列的内容后,l_status的值还是notmodified!,根本进入不了下条语句,该怎么办啊?
哪位大虾可以指教一下吗?
谢谢拉!
...全文
27 13 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
13 条回复
切换为时间正序
请发表友善的回复…
发表回复
jdsnhan 2003-12-22
  • 打赏
  • 举报
回复
dwItemStatus l_status
l_status=dw_1.GetItemStatus(dw_1.GetRow(),dw_1.GetColumn(),Primary!)
if l_status=DataModified! then.......
____________________________________________________________________
accepttext()可能是一个原因。

请楼主多贴点脚本,问题可能与上下文都有关系。
jb99334 2003-12-21
  • 打赏
  • 举报
回复
加AcceptText()试试!
xr_liu 2003-12-21
  • 打赏
  • 举报
回复
AcceptText()
lmby 2003-12-21
  • 打赏
  • 举报
回复
i_bz=dw_1.RowsCopy(dw_1.getrow(),dw_1.getcolum(),Primary!,dw_2,1,Primary!)??

rowscopy(开始行,结束行,缓冲区,目标dw,开始行,缓冲区)

dw_1.getcolumn()不对。

一般是:
i_bz=dw_1.RowsCopy(dw_1.getrow(),dw_1.rowcount(),Primary!,dw_2,1,Primary!)
CodeMagic 2003-12-21
  • 打赏
  • 举报
回复
是这样的,在Pb8的调试环境中对dwItemStatus变量设置断点好像是看不出变化的。

在这样的地方你可以使用MessageBox函数来验证程序的运行结果。

如果l_status还没有发生变化的话,那你可能没把数据窗口的修改反映到数据窗口缓冲区(Dw Buffer)中去,此时你应该在

l_status=dw_1.GetItemStatus(dw_1.GetRow(),dw_1.GetColumn(),Primary!)
之前加上这么一句

dw_1.AcceptText()

coordinate 2003-12-21
  • 打赏
  • 举报
回复
accepttext()了吗
banalman 2003-12-21
  • 打赏
  • 举报
回复
保证AcceptText()
然后将 getcolumn() 直接换成您需要看的列名试试。
liliang800207 2003-12-21
  • 打赏
  • 举报
回复
AcceptText()
mittee 2003-12-21
  • 打赏
  • 举报
回复
以上都是正确的
fulongbiao 2003-12-21
  • 打赏
  • 举报
回复
dw_1.AcceptText()
klbt 2003-12-21
  • 打赏
  • 举报
回复
没有接收数据,增加dw_1.accepttext()
chrisfy 2003-12-21
  • 打赏
  • 举报
回复
AcceptText()
zhangdatou 2003-12-21
  • 打赏
  • 举报
回复
建议使用messagebox测试一下
有时候debug跟在程序里运行有一定的差距

1,108

社区成员

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

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