INSERT INTO出现错误!!!!急!!!
来源:百度知道 编辑:UC知道 时间:2024/06/29 02:26:17
<%
dim conn
DBPath=SERVER.MapPath("data/message.asp")
set conn=Server.CreateObject("ADODB.Connection")
conn.Open"provider=microsoft.jet.oledb.4.0; data source="&DBPath
set rs=server.CreateObject("adodb.recordset")
sql="select * from zhucexinxi"
rs.open sql,conn,1,3
%>
<%
dim sname,semail,ssex,sinput,ddate,sxinming,errormsg,founderror,spassword
founderror=false
errormasg=""
sname=request.form("dname")
sxinming=request.Form("dxinming")
spassword=request.Form("dpassword")
semail=request.form("dE-mail")
ssex=request.form("dsex")
sinput=trim(request.form("dlianxifangshi"))
ddate=now()
if sname=""then
founderror=true
errormsg="<script LANGUAGE='javascript'>alert('对不起!用户名不能为空!');
dim conn
DBPath=SERVER.MapPath("data/message.asp")
set conn=Server.CreateObject("ADODB.Connection")
conn.Open"provider=microsoft.jet.oledb.4.0; data source="&DBPath
set rs=server.CreateObject("adodb.recordset")
sql="select * from zhucexinxi"
rs.open sql,conn,1,3
%>
<%
dim sname,semail,ssex,sinput,ddate,sxinming,errormsg,founderror,spassword
founderror=false
errormasg=""
sname=request.form("dname")
sxinming=request.Form("dxinming")
spassword=request.Form("dpassword")
semail=request.form("dE-mail")
ssex=request.form("dsex")
sinput=trim(request.form("dlianxifangshi"))
ddate=now()
if sname=""then
founderror=true
errormsg="<script LANGUAGE='javascript'>alert('对不起!用户名不能为空!');
多写了一列date,insert语句写完先数数参数数目对不对
补充:
改成
cmdsql="insert into [zhucexinxi]([username],[xinming],[userpassword],[sex],[E-mail],[lianxifangshi],[date]) values('"&sname&"','"&sxinming&"','"&spassword&"','"&ssex&"','"&semail&"','"&sinput&"',#"&ddate&"#)"
还不行就改成
cmdsql="insert into [zhucexinxi]([username],[xinming],[userpassword],[sex],[E-mail],[lianxifangshi],[date]) values('"&sname&"','"&sxinming&"','"&spassword&"',"&ssex&",'"&semail&"','"&sinput&"',#"&ddate&"#)"
注意sex和date的数据类型
cmdsql="insert into zhucexinxi(username,xinming,userpassword,sex,E-mail,lianxifangshi,date,date) values('"&sname&"','"&sxinming&"','"&spassword&"','"&ssex&"&
INSERT INTO出现错误!!!!急!!!
asp insert into错误
ASP中Insert into 语句错误
为什么总报insert into 语句错误
老是出现 INSERT INTO语句出错
安装完游戏出现~The wrong volume is in the drive.Please insert volume YS6 into drive E: 错误窗口~
一个insert into语句的错误,在线急等!
insert into 和select联合起来有错误……
VB 用Insert into 提示错误,希望高手指导一下
向数据库提交信息出现INSERT INTO 语句的语法错误。