错误类型:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E21)
/zhelong/dianying/zhuce.asp, 第 25 行
源代马如下:::
Untitled Document<%
dim user,pwd,email,qq,msn,wenti,daan,add,tel,sex
user=Request.Form("user")
pwd=Request.Form("pwd")
email=Request.Form("email")
qq=Request.Form("qq")
msn=Request.Form("msn")
wenti=Request.Form("wenti")
daan=Request.Form("daan")
add=Request.Form("add")
tel=Request.Form("tel")
sex=Request.Form("sex")
if user="" or pwd="" or email="" or wenti="" or daan="" then
Response.Write"您填写的内容不完整!"
Response.Write"
返回"
Response.End
end if
set rs = server.createobject("adodb.recordset")
sql="select * from yonghu where user= "& user &""
rs.Open sql,conn,1,1
if rs("user")<>"" then
Response.Write"此用户名已被注册!"
Response.Write"
返回"
Response.End
end if
rs.Close
set rs=nothing
dim sqlup
sqlup="insert into user (usr,pwd,email,qq,msn,wenti,daan,add,tel,sex) values (" & user & "," & pwd & "," & email & "," & qq & "," & msn & "," & wenti & "," & daan & "," & add & "," & tel & "," & sex & ")"
rs.Open sqlup,conn,1,1
rs.Close
set rs=nothing
Response.Write"注册成功!"
Response.Write"请关闭此窗口!"
%>
第25行是 rs.Open sql,conn,1,1
但肯定是 sql="select * from yonghu where user= "& user &"" 有问题
我搞了半天也没搞明白,不知道怎么回事!