sql="select Mid(sNum,7,3) from student where sDep=03 and grade=07 and ifdel=0 order by id" set rs=server.createobject("adodb.recordset") rs.open sql,conn,1,1 numCount=rs.recordcount for(int i=0;i<numCount-1;i++) 下面应该怎么表示呢? if 后一位数据 - 前一位数据 >=2 then sNumInt=前一位数据 + 1
set rs=server.createobject("adodb.recordset") rs.open sql,conn,1,1 numCount=rs.recordcount 'Mid(sNum,7,3) Dim Qms,Hms,i i=0 do while i<(numCount-1) rs.move i if not rs.eof then Qms=mid(rs("sNum"),7,3) rs.movenext i=i+1 if not rs.eof then Hms=mid(rs("sNum"),7,3)
'response.write Qms 'response.write Hms 'response.end if Hms - Qms >=2 then sNumInt=Qms + 1 else sNumInt = Hms +1 end if end if end if loop