asp向数据库插入数据的方法rs
发布时间:2016-12-29 来源:查字典编辑
摘要:SetobjRs=Server.CreateObject("Adodb.Recordset")mysql="selectsnamefrom[...
SetobjRs=Server.CreateObject("Adodb.Recordset")
mysql="selectsnamefrom[users]wheresname='"&sname&"'"
objRs.openmysql,objConn,1,3
IfobjRs.BofOrobjRs.EofThen
objRs.addnew
objRs("sname")=sname
objRs.update
Else
callsalert("该用户已经存在,不可以注册")
EndIf