请问如下代码中,如何加入验证注册时用户名重复的情况。
<%
set rs=server.createobject("adodb.recordset")
sql="select username,userpassword,userpassword2,userfullname,usersexual,from wbcompanyuser"
rs.open sql,conn,1,3
rs.addnew
username=request.form("username")
userpassword=request.form("userpassword")
userpassword2=request.form("userpassword2")
userfullname=request.form("userfullname")
usersexual=request.form("usersexual")
rs("username")=username
rs("userpassword")=userpassword
rs("userpassword2")=userpassword2
rs("userfullname")=userfullname
rs("usersexual")=usersexual
rs.update
rs.close
set rs=nothing
conn.close
set conn=nothing
%>