如何判断DW中某一个字段是否被修改了.

peppi 2003-04-25 02:35:03
我想在提交按钮中判断某一字段是否被修改了,或者在DW中判断,能不能给个代码例子?
...全文
74 13 打赏 收藏 转发到动态 举报
写回复
用AI写文章
13 条回复
切换为时间正序
请发表友善的回复…
发表回复
peppi 2003-04-30
  • 打赏
  • 举报
回复
救命恩人啊~~~~
cooltnt 2003-04-30
  • 打赏
  • 举报
回复
呵呵^_^
dwItemStatus l_status
long ll_row

dw_result1.accepttext() //差这句

ll_row = dw_result1.getrow()

l_status = dw_result1.getitemstatus(ll_row,"isvalid",Primary!)

if l_status = DataModified! then
messagebox("test","update")
end if
peppi 2003-04-30
  • 打赏
  • 举报
回复
dwItemStatus l_status
long ll_row

ll_row = dw_result1.getrow()

l_status = dw_result1.getitemstatus(ll_row,"isvalid",Primary!)

if l_status = DataModified! then
messagebox("test","update")
end if

没有输出啊???我用的是PB8,差什么呢?

th820901 2003-04-25
  • 打赏
  • 举报
回复
都可以 试试不就知道了

//结贴 嘻嘻
peppi 2003-04-25
  • 打赏
  • 举报
回复
楼上的,您这个方法是放在DW中,还是按钮中?
linda_gao 2003-04-25
  • 打赏
  • 举报
回复
GetItemStatus method (DataWindows)

sample :

dwItemStatus l_status
l_status = dw_emp.GetItemStatus( dw_emp.GetRow(), "Salary", Primary!)

if l_status = DataModified! then
messagebox("Modified","")
else
messagebox("no modified","")
end if

if you still don't understand , i have nothing to say
peppi 2003-04-25
  • 打赏
  • 举报
回复
我是新手,看懂了.还是不知道怎么用.
有没有例子可以看一下啊,完整的?
linda_gao 2003-04-25
  • 打赏
  • 举报
回复
dwItemStatus
Description

Values for specifying how DataWindow data will be updated in the database.

Values

PowerBuilder enumerated value Web DataWindow Numeric value Meaning
NotModified! NotModified 0 The information in the row or column is unchanged from what was retrieved.
DataModified! DataModified 1 The information in the column or one of the columns in the row has changed since it was retrieved.
New! New 2 The row is new but no values have been specified for its columns. (Applies to rows only, not to individual columns.)
NewModified! NewModified 3 The row is new, and values have been assigned to its columns. In addition to changes caused by user entry or the SetItem method, a new row gets the status NewModified when one of its columns has a default value. (Apples to rows only, not to individual columns.)
linda_gao 2003-04-25
  • 打赏
  • 举报
回复
which version your pb is ?
peppi 2003-04-25
  • 打赏
  • 举报
回复
linda_gao(linda)
怎么判断是不是被修改了?

xirumin(吃好喝好)
GetitemStatus( 行,'列名',)没有这个方法啊.datamodified! 是什么啊?
peppi 2003-04-25
  • 打赏
  • 举报
回复
来了,呵呵,谢谢~~~~~~~
xirumin 2003-04-25
  • 打赏
  • 举报
回复
楼上完全正确,估计楼主不来了

if dw_xxx.GetitemStatus( 行,'列名',) = datamodified! then
//有了更改
end if
linda_gao 2003-04-25
  • 打赏
  • 举报
回复
GetItemStatus method (DataWindows)

dwItemStatus l_status
l_status = dw_emp.GetItemStatus( dw_emp.GetRow(), "Salary", Primary!)

1,076

社区成员

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

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