高手帮下忙看看sql语句错在那里?

来源:百度知道 编辑:UC知道 时间:2024/09/25 07:17:23
<%
If Request("xm")<>"" And Request("yx1")<>"" And Request("sj")<>"" And Request("nn")<>"" Then
Dim xm,wc,yx1,yb,sj,dh,yx2,nn,zy,hy,cx,fs,pp,sj2,gm,lxw,xinxi
xm=Request.Form("xm")
wc=Request.Form("wc")
yx1=Request.Form("yx1")
yb=Request.Form("yb")
sj=Request.Form("sj")
dh=Request.Form("dh")
yx2=Request.Form("yx2")
nn=Request.Form("nn")
zy=Request.Form("zy")
hy=Request.Form("hy")
cx=Request.Form("cx")
fs=Request.Form("fs")
pp=Request.Form("pp")
sj2=Request.Form("sj2")
gm=Request.Form("gm")
lxw=Request.Form("lxw")
xinxi=Request.Form("xinxi")
Dim sql,svalues
sql="Inse

sql="Insert Into book(xm,wc,yx1,yb,sj,dh,yx2,nn,zy,hy,cx,fs,pp,sj2,gm,lxw,xinxi)"
svalues = " Values('" & xm & "'," & wc & "'," & yx1 & "'," & yb & "'," & sj & "'," & dh & "'," & yx2 & "'," & nn & "'," & zy & "'," & hy & "'," & cx & "'," & fs & "'," & pp & "'," & sj2 & "'," & gm & "'," & lxw & "'," & xinxi & "','" & date() & "')"
db.Execute(sql&svalues)

db.Execute(sql)?
sql="Insert Into book(xm,wc,yx1,yb,sj,dh,yx2,nn,zy,hy,cx,fs,pp,sj2,gm,lxw,xinxi" ?
后半截呢?
应改为db.Execute(sql&" "&svalues)?

sql 语句没有写全
insert into 表名(字段名) Values (内容)
db.Execute(sql & ")" svalues &")")