让人疯狂的可能是SQL语句的问题
set rs=server.createobject("adodb.record")
sql="select top 1 sno from student order by intime desc"
rs.open sql,conn,1,1
if not rs.eof then
sno=rs("sno")
end if
rs.close
if sno="" then
sno=year(date())
sno=sno&"0001"
else
sno=sno+1
end if
response.write(sno)
我想对SNO(字符型)字段排号,规则是年+四位数字,后四位数字根据添加日期排序自动加1,但是总是不对,也不提示错误,但输出总是空,????????????