...
usernamevalue=request.form("usernamevalue"
...
set rs=conn.execute("select loginnamefield from registertable where loginnamefield='&usernamevalue&"'")
if not rs.eof or not rs.bof then
response.write "user is exist"
else
conn.execute("insert into...")
end if