asp 问题,我已经搞了2天了,求救呀。。。

来源:百度知道 编辑:UC知道 时间:2024/05/16 15:42:55
你们有时间帮我看一下如下的登陆,怎么也不能把数据提交到,数据库中,老是抱错呀已经搞了2天了,求救

reg.asp

<%@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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>

<body>
<form id="form1" name="form1" method="post" action="res.asp">
姓名:
<label>
<input name="name" type="text" id="name" />
<

set rst1=conn.execute("insert into [user] (name) values ('" & request.form("name") & "')")

set rst1=conn.execute("insert into [user] ([name]) values ('" & request.form("name") & "')")
user,name都是系统保留字,必须加[]号,一个好的习惯是给所有用户自定义的表名列名都用[]号括起来,防止意外出错也便于识别