请大家给我编个检测字段值为空的函数
在ASP中用=rs1("字段1")有空值,用if rs1("字段1")=""不能检测出来,后面想了一个办法用if rs1("字段1")&"aa"="aa"可以判断出来。我自己编的过程只能带一个字段变量可以用,但我有很多个记录集,请大家给我编个带记录集和字段名为变量,检测字段值为空的函数!
谢谢!!!
2010-03-28 15:26
2010-03-28 16:20
2010-03-29 14:06

2010-03-29 16:15
2010-03-30 08:56
程序代码:do while not rs.eof
if rs("字段一")="" or isnull(rs("字段一")) then
echo "是空字段"
end if
rs.MoveNext
loop
2010-03-30 11:34
2010-03-30 13:41
程序代码:Dim rs(30)
rs(0)="0"
rs(1)="1"
rs(2)="2"
rs(3)="3"
....
rs(30)=""
for i=1 to 30
if rs(i)="" or isnull(rs(i)) then
response.write "是空字段<br>"
else
response.write ee(i)&"<br>"
end if
next
2010-03-30 14:17