以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  求助  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=44713)

--  作者:Bin
--  发布时间:2014/1/7 14:03:00
--  
BeforeSaveDataRow中判断一下如果列为空就弹出提示设置e.cancel=true 不允许保存吧
--  作者:Bin
--  发布时间:2014/1/7 14:57:00
--  
2楼的方案即可
--  作者:Bin
--  发布时间:2014/1/7 14:58:00
--  
关于空值判断请看这里http://www.foxtable.com/help/topics/1516.htm

可以使用 e.datarow.isnull("列名") 来进行判断

--  作者:Bin
--  发布时间:2014/1/7 15:11:00
--  
在增加按钮中写? 这样的做法不太科学.

而且这么简单的代码,如果你有用心去学一下,不应该写不出来呀.

--  作者:Bin
--  发布时间:2014/1/7 15:22:00
--  
在导入按钮中,利用
dim drList as List(of datarow) = datatables("表名").select("列1 is null or 列2 is null")
if drlist.count >0 then
    messagebox.show("有空值不允许导入")
else
    导入代码
end if

--  作者:Bin
--  发布时间:2014/1/7 15:57:00
--  
多加个条件就可以了 

datatables("表名").select("(品名 is not null and 品名1 is not null) and 列1 is null or 列2 is null")

--  作者:lsy
--  发布时间:2014/1/7 16:31:00
--  
 下载信息  [文件大小:   下载次数: ]
图片点击可在新窗口打开查看点击浏览该文件:空值提示.table