请教数据库连接问题
时间:2010-09-03
来源:互联网
大家好,我是新手,刚开始学ASP,制作网页中出现以下问题,请问如何解决?
-----------------以下是代码:
body {
margin-left: 0px;
margin-top: 0px;
}
td {
font-family: "黑体";
font-size: 14px;
color: #000033;
}
-->
</style>
</head>
<body>
<!--#include file="include/top.htm"-->
<!--#include file="include/conn.asp"-->
<%
dim user,password,sql
user=request.Form("user")
password=request.Form("password")
if user<>"" and password<>"" then
sql="select * from user where user='" &user& "' abd pword='" &password& "'"
rs.open sql,conn,1,1
if not re.eof then
response.Redirect("index1.asp")
else
%>
<script>
alert("您输入的用户名或密码不正确!")
location.href="admin.asp"
</script>
<%
end if
else
%>
----------------------------------在IIS中预览告之以下错误:
技术信息(用于支持人员)
错误类型:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E21)
ODBC 驱动程序不支持所需的属性。
/admin.asp, 第 30 行
浏览器类型:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; SE 2.X)
网页:
POST 30 ??? /admin.asp
----------------------表示第30行有错,我的第30行是:
rs.open sql,conn,1,1
----------------------使用的MS access数据库:
请问我该怎么改?
非常感谢!
-----------------以下是代码:
body {
margin-left: 0px;
margin-top: 0px;
}
td {
font-family: "黑体";
font-size: 14px;
color: #000033;
}
-->
</style>
</head>
<body>
<!--#include file="include/top.htm"-->
<!--#include file="include/conn.asp"-->
<%
dim user,password,sql
user=request.Form("user")
password=request.Form("password")
if user<>"" and password<>"" then
sql="select * from user where user='" &user& "' abd pword='" &password& "'"
rs.open sql,conn,1,1
if not re.eof then
response.Redirect("index1.asp")
else
%>
<script>
alert("您输入的用户名或密码不正确!")
location.href="admin.asp"
</script>
<%
end if
else
%>
----------------------------------在IIS中预览告之以下错误:
技术信息(用于支持人员)
错误类型:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E21)
ODBC 驱动程序不支持所需的属性。
/admin.asp, 第 30 行
浏览器类型:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; SE 2.X)
网页:
POST 30 ??? /admin.asp
----------------------表示第30行有错,我的第30行是:
rs.open sql,conn,1,1
----------------------使用的MS access数据库:
请问我该怎么改?
非常感谢!
作者: highbug 发布时间: 2010-09-03
复制内容到剪贴板
中的abd是什么意思? 代码:
sql="select * from user where user='" &user& "' abd pword='" &password& "'"作者: bqh324 发布时间: 2010-09-04
引用:
原帖由 bqh324 于 2010-9-4 08:07 发表sql="select * from user where user='" &user& "' abd pword='" &password& "'"
中的abd是什么意思?
[ 本帖最后由 highbug 于 2010-9-4 09:34 编辑 ]
作者: highbug 发布时间: 2010-09-04
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28