<%
dim conn,sql,rs,yhm,result
yhm=request("yhm")
Set conn = Server.CreateObject("ADODB.Connection")
sql="Provider=Microsoft.Jet.OLEDB.4.0;Data Source="&dataurl
conn.Open sql
set rs=server.CreateObject("adodb.recordset")
rs.Open "select * from yhm where yhm='"&yhm&"'",conn,1,3
if not(rs.bof and rs.eof) then
result="<font color='#FF0000'>对不起,该用户名已被注册!<BR>请重新填写...</font>"
else
result="<font color='#FF0000'>恭喜!该用户名可以使用。</font>"
end if
response.Write(result)
%>
试试这个,我自己的就这样写的,可以的!!演示地址:
http://www.mschem.net/hzsingle/class/regiest.asp