我的checked.asp页面。急!!!!!!!!!!

wbqc9912115 2003-10-17 03:59:49
<!--#include file="conn.asp"-->
<%
user=request.form("username")
pass=request.form("password")
dim rs
dim sql
set rs=server.CreateObject("recordset")
set sql="select * from userinfo where user='"&username&"'&pass='"&password&"'"
set rs= execut(sql)
if not rs.eof="" then
response.Redirect("gongzuoshi.html")
else
response.Write("你的用户名或者密码不正确,请重新输入。")
end if


%>


行时出错(第7行).
...全文
33 11 打赏 收藏 转发到动态 举报
写回复
用AI写文章
11 条回复
切换为时间正序
请发表友善的回复…
发表回复
wbqc9912115 2003-10-17
  • 打赏
  • 举报
回复
还是报错。(第3行)
stefli 2003-10-17
  • 打赏
  • 举报
回复
<%
set conn = Server.CreateObject("ADODB.Connection")
conn.Open "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath("data/szav.mdb")
%>

这种连接常用哦!简单,方便!
wbqc9912115 2003-10-17
  • 打赏
  • 举报
回复
不行啊。第7行有问题。
mycl3344 2003-10-17
  • 打赏
  • 举报
回复
<%
dim dbconnection
dim DBPath
db="data/szav.mdb"
Set conn = Server.CreateObject("ADODB.Connection")
connstr="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(""&db&"")
conn.Open connstr
%>
這樣就不會有錯了
wbqc9912115 2003-10-17
  • 打赏
  • 举报
回复
楼上的大哥。
还有个问题问你啊。
//conn.asp
<%
dim dbconnection
dim DBPath
set dbconnection=Server.CreateObject("ADODB.Connection")
DBPath = Server.MapPath("data/szav.mdb")
dbconnection.Open "provider=microsoft.jet.oledb.4.0;data source="&dbpath

%>
它说第6行有错。是哪个地方错了啊。
1蓝天1 2003-10-17
  • 打赏
  • 举报
回复
同意 enthuris(enthuris) 的意见
angelheavens 2003-10-17
  • 打赏
  • 举报
回复
if not rs.eof="" then改成:
if not rs.eof then
tana 2003-10-17
  • 打赏
  • 举报
回复
同意楼上的
stefli 2003-10-17
  • 打赏
  • 举报
回复
set sql="select * from userinfo where user='"&username&"'and pass='"&password&"'"
NetBoy 2003-10-17
  • 打赏
  • 举报
回复
SQL语句里"&"要用"and"来表示:
set sql="select * from userinfo where user='"&username&"' and pass='"&password&"'"
应该没问题了
enthuris 2003-10-17
  • 打赏
  • 举报
回复
set rs=server.CreateObject("recordset")
---->
set rs=server.CreateObject("adodb.recordset")

28,390

社区成员

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

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