数据库的插入问题
<%
sub SaveAdd
xm=trim(request("xm"))
sfzh=trim(request("sfzh"))
lxdh=trim(request("lxdh"))
dnlx=trim(request("dnlx"))
ppxh=trim(request("ppxh"))
ys=trim(request("ys"))
swfs=trim(request("swfs"))
ffdh=trim(request("ffdh"))
swzh=trim(request("swzh"))
mac1=trim(request("mac1"))
mac2=trim(request("mac2"))
mac3=trim(request("mac3"))
jsjm=trim(request("jsjm"))
ypxlh=trim(request("ypxlh"))
cpuxlh=trim(request("cpuxlh"))
cpxlh=trim(request("cpxlh"))
sydz=trim(request("sydz"))
szdw=trim(request("szdw"))
tbr=trim(request("tbr"))
tbdw=trim(request("tbdw"))
scsj=trim(request("scsj"))
sfbd=trim(request("sfbd"))
set rs=server.createObject("Adodb.recordset")
rs.open sql,conn
' MaxID=rs(0)
rs.close
set rs=nothing
Sql="insert into mac(xm,sfzh,lxdh,dnlx,ppxh,ys,swfs,ffdh,swzh,mac1,mac2,mac3,jsjm,ypxlh,cpuxlh,cpxlh,sydz,szdw,tbr,tbdw,scsj,sfbd) values(" & xm& ",'" & sfzh & "','" & lxdh & "','" & dnlx & "','" & ppxh & "'," & ys & "," & swfs & ",'" &ffdh & "','" & swzh & "','" & mac1 & "','" & mac2 & "','" & mac3 & "','" & ypxlh & "','" & cpuxlh & "','" & sydz & "','" & szdw & "','" & tbr & "','" & tbdw & "','" & scsj & "','" & sfbd & "')"
conn.execute Sql
end sub
%>
为什么实现不了插入
------解决方案--------------------汗,你干嘛把程序就直接搬过来了。报错了吗?你报的什么错?
------解决方案--------------------应该是事务没有提交吧
conn.commit
------解决方案--------------------
------解决方案--------------------查询分析器里面都插不进去,那还说个啥?