j=0
for i=1 to rs.fields.count
  if not isnull(rs.fields.count) then
    j=j+1
  end if
nextNotNullFieldsNum=j

解决方案 »

  1.   

    统计记录数:Count(*)、Count([Column Name])
    这两个运算符是有差别的:
    Count(*) 计算所有的行。 
    Count([Column Name])计算所有Column Name非空的行。你该会了吧!
      

  2.   

    j=0
    do while not rs.eof
        for i=0 to 字段数目-1
           if not isnull(rs.fields(i).value) then
              j=j+1
           end if
        next
        rs.movenetfxt
    loop
    NotNullFieldsNum=j
      

  3.   

    j=0
    do while not rs.eof
        for i=0 to 字段数目-1
           if not isnull(rs.fields(i).value) then
              j=j+1
           end if
        next
        rs.movenext
    loop
    NotNullFieldsNum=j
      

  4.   

    j=0
    do while not rs.eof
        for i=0 to rs.fields.count-1
           if not isnull(rs.fields(i)) then
              j=j+1
           end if
        next
        rs.movenetfxt
    loop
    NotNullFieldsNum=j