版主 大侠出来看看吧
程序代码:
add.asp --------------------- <%@LANGUAGE="VBSCRIPT"%><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.> <html xmlns="http://www.> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title></title> </head> <body> <table width="100%" border="0" bgcolor="#FFFF99"> <tr> <td colspan="4"><h2 align="center"><span class="STYLE3">*</span>鑫远物流仓库出入库信息录入<span class="STYLE3">*</span></h2> </tr> <tr> <td colspan="4"> <div align="right"><a href="index.asp">首页</a> <a href="select.asp">查询</a> <br> </div></td> </tr> <tr> <td><center> <table width="58%" height="100%" border="1"> <form name="form1" method="post" action="insert.asp"> <tr bgcolor="#0066FF"> <td colspan="2"><div align="center"></div></td> </tr> <tr bgcolor="#0066FF"> <td width="27%" bgcolor="#0066FF"><div align="center">流水编号</div></td> <td width="73%" bgcolor="#0066FF"><div align="center"><input name="lsbh" type="text" id="lsbh" value="无记录" /> </div></td> </tr> <tr bgcolor="#0066FF"> <td width="27%" bgcolor="#0066FF"><div align="center">出/入</div></td> <td width="73%" bgcolor="#0066FF"><div align="center"><input name="cr" type="text" id="cr" value="无记录" /> </div></td> </tr> <tr> <td width="27%" bgcolor="#0066FF"><div align="center">日期</div></td> <td width="73%" bgcolor="#0066FF"><div align="center"> <input name="time" type="text" id="time" value="无记录" /> </div></td> </tr> <tr> <td width="27%" bgcolor="#0066FF"><div align="center">业务类别</div></td> <td width="73%" bgcolor="#0066FF"><div align="center"> <input name="ywlb" type="text" id="ywlb" value="无记录" /> </div></td> </tr> <tr> <td width="27%" bgcolor="#0066FF"><div align="center">批号/品名</div></td> <td width="73%" bgcolor="#0066FF"><div align="center"> <input name="tdh" type="text" id="tdh" value="无记录" /> </div></td> </tr> <tr> <td width="27%" bgcolor="#0066FF"><div align="center">货代</div></td> <td width="73%" bgcolor="#0066FF"><div align="center"> <input name="hd" type="text" id="hd" value="无记录" /> </div></td> </tr> <tr> <td bgcolor="#0066FF"><div align="center">重量</div></td> <td width="73%" bgcolor="#0066FF"><div align="center"> <input name="zl" type="text" id="zl" value="无记录" /> </div></td> </tr> <tr> <td width="27%" bgcolor="#0066FF"><div align="center">体积</div></td> <td width="73%" bgcolor="#0066FF"><div align="center"> <input name="tj" type="text" id="tj" value="无记录" /> </div></td> </tr> <tr> <td width="27%" bgcolor="#0066FF"><div align="center">入库数量</div></td> <td width="73%" bgcolor="#0066FF"><div align="center"> <input name="rksl" type="text" id="rksl" value="无记录" /> </div></td> <tr> <td width="27%" bgcolor="#0066FF"><div align="center">出库数量</div></td> <td width="73%" bgcolor="#0066FF"><div align="center"> <input name="cksl" type="text" id="cksl" value="无记录" /> </div></td> <tr> <td width="27%" bgcolor="#0066FF"><div align="center">运输车号</div></td> <td width="73%" bgcolor="#0066FF"><div align="center"> <input name="ysch" type="text" id="ysch" value="无记录" /> </div></td> <tr> <td width="27%" bgcolor="#0066FF"><div align="center">备注</div></td> <td width="73%" bgcolor="#0066FF"><div align="center"> <input name="bz" type="text" id="bz" value="无记录" /> </div></td> <tr> <td align="center" colspan="2"><span class="STYLE2"> <input type="submit" value="添加"> <input type="reset" value="重置"> <a href="index.asp">取消</a></span></td> </tr> </form> </table> </center> </table> </body> </html>insert.asp ------------------------------------- <% Option Explicit %> <% Dim db Set db=Server.CreateObject("ADODB.Connection") db.Open "table" dim strSql,strlsbh,strcr,strtime,strywlb,strtdh,strhd,strzl,strtj,strrksl,strcksl,strysch,strbz strlsbh=request.form("lsbh") strcr=request.form("cr") strtime=request.form("time") strywlb=request.form("ywlb") strtdh=request.form("tdh") strhd=request.form("hd") strzl=request.form("zl") strtj=request.form("tj") strrksl=request.form("rksl") strcksl=request.form("cksl") strysch=request.form("ysch") strbz=request.form("bz") strsql="insert into 2011 (lsbh,cr,time,ywlb,tdh,hd,zl,tj,rksl,cksl,ysch,bz) values ('"&strlsbh&"','"&strcr&"','"&strtime&"','"&strywlb&"','"&strtdh&"','"&strhd&"','"&strzl&"','"&strtj&"','"&strrksl&"','"&strcksl&"','"&strysch&"','"&strbz&"')" db.Execute(strSql) Response.Redirect "add.asp" %> ------------------------- 错误类型: Microsoft OLE DB Provider for ODBC Drivers (0x80040E14) [Microsoft][ODBC Microsoft Access Driver] INSERT INTO 语句的语法错误。 /xywl/insert.asp, 第 21 行(db.Execute(strSql) 应该是strsql这错误 但我找不出来 符号我都查几遍了)
[ 本帖最后由 kevinxu0638 于 2011-12-8 10:21 编辑 ]