.....
user=request("user")
......
set rs = server.CreateObject("Adodb.recordset")
sqltext = "Select * from "&table&" where username='"&user&"'"
rs.open sqltext,conn,2,3
if rs.eof then
rs.addnew
......
rs.update
else
response.Write("用户名已经存在")
end if
rs.close
set rs=nothing