提交数据库错误

来源:百度知道 编辑:UC知道 时间:2024/05/28 14:43:44
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"><html>
<%
set conn=Server.CreateObject("ADODB.Connection")
conn.open "DRIVER=Driver do Microsoft Access (*.mdb);UID=admin;PWD=;DBQ="&Server.MapPath("fifasp.mdb")
%>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>注册结果</title>
<style type="text/css">
<!-
body {
margin-top: 0px;
margin-bottom: 0px;
background-im

1.错误的原因为,user为保留字
rst.open"select * from user where u_user='" & request.form("f_user") & "'",conn,1,1 '改为
rst.open"select * from [user] where u_user='" & request.form("f_user") & "'",conn,1,1
2.
rst.open "user",conn,1,3 '改为
rst.open "select * from [user]",conn,1,3
3.
rst.open "info22",conn,1,3 '改为
rst.open "select * from info22",conn,1,3
'出现2,3这种情况,你试后,对比一下,就知道了.

另[ASP中的常见保留字]可上纲查一下.

是不是少了个空格呀?
rst.open"select * from user where u_user='" & request.form("f_user") & "'",conn,1,1
rst.open "select * from user where u_user='" & request.form("f_user") & "'",conn,1,1

request.form("f_user") 看这个值是否为空

rst.open"select * from user where u_user='" & request.form("f_user&qu