怎么表示DW为空呢?想不起来了,呵呵,急,急,急!

gwly 2003-10-23 08:11:59
怎么表示DW为空呢?想不起来了,呵呵,急,急,急!
...全文
52 11 打赏 收藏 转发到动态 举报
写回复
用AI写文章
11 条回复
切换为时间正序
请发表友善的回复…
发表回复
taobujue 2003-10-28
  • 打赏
  • 举报
回复
up
coolroy2000 2003-10-24
  • 打赏
  • 举报
回复
dw_1.Object.emp_name.Edit.Required = "yes"
就可以了,不用那么复杂。只是message是系统的。
如果自己定义错误的话,楼上的都可以选择,但需要在ItemError事件中返回1以屏蔽系统事件。
鸡翅多 2003-10-24
  • 打赏
  • 举报
回复
长学问!
jdsnhan 2003-10-24
  • 打赏
  • 举报
回复
保存前:
long ll_currow = 1
integer colnbr=0
string colname,sumcol
adw_find.accepttext()
DO WHILE ll_currow<>0
colnbr++//继续找下一列
IF adw_find.FindRequired(Primary!,ll_currow,colnbr,colname,FALSE) < 0 then exit;
//若程序出错则返回
IF ll_currow<>0 then
sumcol = sumcol + adw_find.describe(colname+'_t'+'.text')
messagebox('错误提示','第' + string(ll_currow) + '行"' + trim(sumcol) + '"为空,请正确填写')
adw_find.modify(colname + "_t.Color = '255'")
adw_find.setfocus()
adw_find.setcolumn(colname)
return
END IF
LOOP
lmby 2003-10-23
  • 打赏
  • 举报
回复
保存前:

long ll_find

ll_find = dw_name.find( 'isnull(column)', 1, dw_name.rowcount() )

if ll_find > 0 then
messagebox( '', 'Cannot be null')
dw_name.setcolumn( column )
dw_name.setrow( ll_find )
dw_name.setfocus()
return
end if


ok~
YewPu 2003-10-23
  • 打赏
  • 举报
回复
不知道!
mittee 2003-10-23
  • 打赏
  • 举报
回复
在设计表时除了id列都设为可为空,
其它的判断都放在数据窗口的保存事件里。
jdsnhan 2003-10-23
  • 打赏
  • 举报
回复
什么时候检测,保存时?
wspeed 2003-10-23
  • 打赏
  • 举报
回复
可以自己写个语句判断,要不就在edit出将requierd的选项选上就可以,这样的话提示信息是系统默认的。
欣萱好米 2003-10-23
  • 打赏
  • 举报
回复
long ll_rowcount,ll_index
ll_rowcount=dwcontrol.rowcount()
for ll_index =1 to ll_rowcount
if dwcontrol.object.#1[ll_index]=''then
/if isnull(dwcontrol.object.#1[ll_index]) then
.....
endif
next
或者
gwly 2003-10-23
  • 打赏
  • 举报
回复
写错了,应该是DW的当前字段不能为空,

1,108

社区成员

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

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