if rs.eof then rs.addnew rs("yhm")=yhm rs("mm")=mm rs("name")=name rs("tel")=tel rs("xb")=xb rs.update rs.close conn.close set rs=nothing set rs=nothing else msgbox"用户名已存在!" rs.close conn.close set rs=nothing set rs=nothing response.Write("用户名已存在!") end if