注册 登录
编程论坛 ASP技术论坛

asp新手求助。。网页登陆代码出了问题

Emma_ 发布于 2013-02-26 19:56, 611 次点击
我的代码...

<!--#INCLUDE file="ADOFunction.asp"-->
<%
UserId=Trim(Request.form("username"))
UserPassword=Trim(Request.form("password"))
if(UserId=""or UserPassword="")then
response.write "<script>alert('请输入用户名和密码');location.href='home.html';</script>"
Response.End
End if
set RS=server.createobject("adodb.recordset")
StrSQL="SELECT*FROM info where Username='"&UserId&"'"
StrSQL=StrSQL&"AND Password='"&UserPassword&"'"
Set RS=GetRecordset(StrSQL)
if RS.EOF then
      response.write"用户名或密码错误"
      response.End
      end if
  Response.Cookies("Username")=UserId
  Response.Cookies("Password")=UserPassword
  Response.Cookies("passed")="Passed"
  Response.Redirect"homedenglu.asp"
  %>


错误提示:
类型不匹配: 'GetRecordset'

哪位高手能够帮助我一下  谢谢谢谢谢谢~~~~~
5 回复
#2
Emma_2013-02-26 20:09
ADOFunction.asp  这个函数是

<%
Function GetSQLRecordset(StrSQL)
Set Conn=Server.CreateObject("ADODB.Connection")
Conn.Open"Mydata"
Set GetSQLRecordset=Server.CreateObject("ADODB.Recordset")
GetSQLRecordset.Open StrSQL,Conn,adOpenKeyset,adLockOptimistic,adCmdText
End Function
%>
#3
dzt00012013-02-26 20:53
GetSQLRecordset和GetRecordset??写错了吧
#4
Emma_2013-02-27 08:28
回复 3楼 dzt0001
我是新手..不太懂什么意思,可不可以详细一点。谢谢
#5
fcxyp2013-02-27 09:07
http://vip886. 可以到这儿看下吧
#6
Emma_2013-02-27 09:34
谢谢谢谢~~~我已经弄出来了
1