求助!求助!不知道哪错了!!

tcnxm23 2011-10-15 04:53:04
<!--#include file="config.inc"-->
<html>
<head>
<title>会员登录</title>
<style>
<!--td{font:10pt;}-->
</style>
</head>
<body style="font:10pt">
<% dim flag
logname=trim(request.form("logname"))
pasword=trim(request.Form("pasword"))
if logname=""then
response.Write"<center><h1>操作错误请重试!</center></h1>"
response.End
else
dim cn,points,login
if logname="" or pasword=""then
response.Write"<p align=center>出错提示:会员名、密码不能为空!</p>"
response.Write"<p align=center><a href=oldlogin.asp>点击这里重新登陆!</a></p>"
response.End
end if

set cn=Server.CreateObject("ADODB.Recordset")
cn.open "select * from users where userid='"& logname &"'and userpw='"& pasword &"'",connstring

if cn.eof then
response.Write"<p align=center>出错提示:会员名不存在,活会员名、密码不正确!</p>"
response.Write"<p align=center><a href=oldlogin.asp>1、重新进入登陆页面!</a></p>"
response.Write"<p align=center><a href=enroll.asp>2、注册新用户!</a></p>"
response.End
else
response.Write"<font style=font:10pt>登陆成功!<a href=temp.htm style=color:blue>继续购物</a></font><br>"
session("login")=session.SessionID
session("loginuser")=cn("userid")
end if

points=cn("points")
if points<>0 then
response.Write"<br><font style=font:10pt>恭喜您的积分已经达到<font color=red>" & points & "</font>"
end if

cn.close
set cn=nothing
end if
%>
</body>
</html>



*********************************************
错误

Microsoft OLE DB Provider for ODBC Drivers '80040e4e'

操作已被取消。

\www\findhistory.asp, line 25
**********************************


麻烦给看看哪错了啊???

...全文
86 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
tcnxm23 2011-10-16
  • 打赏
  • 举报
回复
[Quote=引用 3 楼 beyond_me21 的回复:]

这行后面要加上1,1
你改了没有呀?
[/Quote]

改了啊,结果还是语句未结束
chinaskysun 2011-10-16
  • 打赏
  • 举报
回复
[Quote=引用 4 楼 tcnxm23 的回复:]

引用 3 楼 beyond_me21 的回复:

这行后面要加上1,1
你改了没有呀?


改了啊,结果还是语句未结束
[/Quote]cn.open "select * from users where userid='"& logname &"'and userpw='"& pasword &"'",connstring,1,1

你是不是少加个逗号啊?
beyond_me21 2011-10-15
  • 打赏
  • 举报
回复
这行后面要加上1,1
你改了没有呀?
tcnxm23 2011-10-15
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 gukie 的回复:]

VB code

cn.open "select * from users where userid='"& logname &"'and userpw='"& pasword &"'",connstring,1,1
[/Quote]

恩对 是提示这行错了,不过还是不行啊 还是那个错误
gukie 2011-10-15
  • 打赏
  • 举报
回复

cn.open "select * from users where userid='"& logname &"'and userpw='"& pasword &"'",connstring,1,1

28,405

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧