exec="select * from sa where name='"+name+"' and password="+ic
这里密码字段一般都是字符行吧,改成
exec="select * from sa where name='"+name+"' and password='"+ic+"'"
这个,看起来没错
name=request.form("name")
exec="select * from sa where name like '%"&name&"%' "
set rs=server.createobject("adodb.recordset")
rs.open exec,conn,1,1
你看看,name=request.form("name")是否取到了值
还有name,password好像都是SQl保留字,你改改字段名
name=request.form("name")
password=request.form("ic")
exec="select * from sa where name='"+name+"' and password="+ic
password应该是字符串类型,ic是什么?你既然有password=request.form("ic"),为什么exec里面还用ic呢?
改成这样试试:
exec="select * from sa where name='"+name+"' and password='"+password+"'"
补充问题语法没错。