ASP求救呀,,有谁知道这里面哪里错了,,,,,添加记录,都添加不进去,

来源:百度知道 编辑:UC知道 时间:2024/05/03 06:53:01
<!--#include file="conn.asp"-->
<!--#include file="config.asp"-->
<!--#include file="md5.asp"-->
<% dim rs,rs_1
dim type1,rname,pass,rquestion,ranswer,sex
dim qq,email,hpage,province,city,phone
type1 = trim(request("type"))
rname = trim(request("rname"))
pass = md5(trim(request("pass1")))
question = trim(request("rquestion"))
answer = (trim(request("ranswer")))
sex = trim(request("sex"))
qq =trim(request("qq"))
email = trim(request("email"))
hpage = trim(request("hpage"))
province = trim(request("szSheng"))
city = trim(request("szShi"))
phone = trim(request("phone"))

set rs_1=server.CreateObject("adodb.recordset")
rs_1.open "select rid,rname from reg where r

应该是没接受到才是真的我想 request.form的方式来接受才对
二楼的应该看看他下面重新全部打开了的
一楼的跟二楼说的问题一样 是添加新的 不是那问题
这个也要看看了才知道
问题可能很多
先看看是不是我这个问题

SELECT不是用来添加记录的 是用来查询的 插入记录应该用INSERT语句啊

楼上的误人子弟!人家是用addnew
方法来添加的,只是你打开的字段比要添加的字段少,所以添加不进.
rs_1.open "select * from reg where rname='"&trim(request("rname"))&"'",conn,1,1

有错误提示吗?
另LZ最好把接收表单值写成Request.Form("xxx")

把错误提示贴出来吧!~

建议在response.Write"<script LANGUAGE='javascript'>alert('用户名已经存在,请换个用户名!');history.go(-1);</script>"
后面加一句
response.end