rs.bof rs.eof 使用
作者:memory 发布时间:2010-04-20, 19:16:25 分类:WEB程序开发 阅读:1888
set rs=server.CreateObject("ADODB.RECORDSET")
sql="select * from M_admin where username='"&username&"' " '查询用户名是否有相同
rs.open sql,conn,1,3
if not (rs.bof and rs.eof) then '判断第一条到最后一条是否存在相同值
response.Write("〈script〉alert(""已经存在管理员名称"");history.back();〈/script〉")
rs.close
set rs=nothing
else
rs.addnew '写入新的数据rs("username")=username
rs(
sql="select * from M_admin where username='"&username&"' " '查询用户名是否有相同
rs.open sql,conn,1,3
if not (rs.bof and rs.eof) then '判断第一条到最后一条是否存在相同值
response.Write("〈script〉alert(""已经存在管理员名称"");history.back();〈/script〉")
rs.close
set rs=nothing
else
rs.addnew '写入新的数据rs("username")=username
rs(



