ASP 我要判断用户名是否已存在

来源:百度知道 编辑:UC知道 时间:2024/05/26 20:11:03
set conn=server.CreateObject("ADODB.Connection")
conn.open "dsn=hk7;"
dim hw,ag
set hw=server.CreateObject("ADODB.Recordest")
ag="select user from login where user=' "&struser&" ' "
hw.open ag,conn,1,1
set hw=conn.execute(ag)

else if hw.ReCordCount > 0 then
response.Write("dddddddddddddddddd")
错误代码 (0x800A01A8) 缺少对象:" else if hw.recordcount > 0 then 在这一个行上面

之前肯定有IF 不然我能用ELSE 晕死

ag="select * from login where user=' "&struser&" ' "
hw.open ag,conn,1,1
if rs.eof then
可以注册
else
不可以注册

为了方便中间的用文字代替

ag="select count(user) from login where user=' "&struser&" ' "

else if hw.recordcount > 0 then
从你的代码来看。。你在这个代码之前根本没有if语句。。为什么还要加上else if 呢?这样肯定会出错的啊。。你把else去掉就应该没有问题了!