一个ID超级链接的修改字段问题
在CX1。asp至cx2.asp过程中出现 语法错误 (操作符丢失) 在查询表达式 'id=' 中。cx.asp主要代码:
<td width="3%"><p align="center"><a href="cx1.asp?id=<%=rs("id")%>" target="_blank"><%=rs("id")%></a></td>
cx1.asp代码:
<!--#include file="conn.asp"-->
<%
id=request("id")
set rs=server.createobject("adodb.recordset")'创建记录集对象
exec="SELECT * FROM clwx WHERE id="&id&""
rs.open exec,conn,3,3
%>
<form name="form1" method="post" action="cx2.asp">
<p align="center"><b>
<font face="楷体_GB2312">
<font size="5" color="#0080C0">焦场设备档案</font><font size="5" color="#0000FF">[修
改]</font></font></p>
<table border="1" width="695" height="755" cellspacing="1" bordercolor="#757575" cellpadding="0" style="border-collapse: collapse" id="table1">
<tr>
<td height="19" width="82" align="center" bgcolor="#C0C0C0"><b>ID</b></td>
<td height="19" width="105" align="center" bgcolor="#C0C0C0"><b>配件名称</b></td>
<td height="19" width="109" align="center" bgcolor="#C0C0C0"><b>车辆名称</b></td>
<td height="19" width="155" align="center" bgcolor="#C0C0C0"><b>配件型号</b></td>
<td height="19" width="100" align="center" bgcolor="#C0C0C0"><b>供应商</b></td>
<td height="19" width="120" align="center" bgcolor="#C0C0C0">
<b>经手人</b></td>
</tr>
<tr>
<td height="32" width="82" align="center"><%=rs("id")%></td>
<td height="32" width="105" align="center">
<input type="text" name="pjmc" size="12" value="<%=rs("pjmc")%>"></td>
<td height="32" width="109" align="center">
<input type="text" name="clmc" size="12" value="<%=rs("clmc")%>"></td>
<td height="32" width="155" align="center">
<input type="text" name="pjxh" size="15" value="<%=rs("pjxh")%>"></td>
<td height="32" width="100" align="center">
<input type="text" name="gys" size="12" value="<%=rs("gys")%>"></td>
<td height="32" width="120" align="center"><b>
<input type="text" name="jsr" size="12" value="<%=rs("jsr")%>"></b></td>
</tr>
<tr>
<td height="19" width="82" align="center" bgcolor="#CDCDCD" bordercolor="#A1A1A1">
<b>维修类型</b></td>
<td height="19" width="105" align="center" bgcolor="#CDCDCD" bordercolor="#A1A1A1">
<b>配件种类</b></td>
<td height="19" width="109" align="center" bgcolor="#CDCDCD" bordercolor="#A1A1A1">
<b>投用日期</b></td>
<td height="19" width="155" align="center" bgcolor="#CDCDCD" bordercolor="#A1A1A1">
<b>维修日期</b></td>
<td height="19" width="100" align="center" bgcolor="#CDCDCD" bordercolor="#A1A1A1">
<font size="2"><b>数量</b></font></td>
<td height="19" width="120" align="center" bgcolor="#CDCDCD" bordercolor="#A1A1A1">
<b>单价</b></td>
</tr>
<tr>
<td height="32" width="82" align="center">
<input type="text" name="wxlx" size="8" value="<%=rs("wxlx")%>"></td>
<td height="32" width="105" align="center">
<input type="text" name="pjzl" size="12" value="<%=rs("pjzl")%>"></td>
<td height="32" width="109" align="center">
<input type="text" name="tyrq" size="12" value="<%=rs("tyrq")%>"></td>
<td height="32" width="155" align="center">
<input type="text" name="wxrq" size="15" value="<%=rs("wxrq")%>"></td>
<td height="32" width="100" align="center">
<input type="text" name="sl" size="12" value="<%=rs("sl")%>"></td>
<input type="hidden" name="xgrq" value="<%=now()%>">
<td height="32" width="120" align="center"><%=rs("tjrq")%><input type="text" name="dj" size="12" value="<%=rs("dj")%>"></td>
</tr>
<tr>
<td height="19" width="296" align="center" bgcolor="#CDCDCD" colspan="3">
<b>合计价格</b></td>
<td height="19" width="375" align="center" bgcolor="#CDCDCD" colspan="3">
<b>调度落实</b></td>
</tr>
<tr>
<td height="30" width="296" align="center" colspan="3">
<b>
<input type="text" name="hjjg" size="12" value="<%=rs("hjjg")%>"></td>
<td height="30" width="375" align="center" colspan="3">
<b>
<input type="text" name="ddls" size="12" value="<%=rs("ddls")%>"></td>
</tr>
<tr>
<td height="19" width="305" colspan="3" bgcolor="#CDCDCD">
<p align="center"><b>维修记录</b></td>
<td height="19" width="381" colspan="3" bgcolor="#CDCDCD">
<p align="center"><b>故障描述</b></td>
</tr>
<tr>
<td height="373" width="305" colspan="3" align="left" valign="top">
<textarea rows="28" name="wxjl" cols="41"><%=rs("wxjl")%></textarea></td>
<td height="373" width="381" colspan="3" align="left" valign="top">
<textarea rows="28" name="gzms" cols="51"><%=rs("gzms")%></textarea></td>
</tr>
</table>
<p align="center">
<input type="submit" name="Submit" value="提交">
<input type="hidden" name="id" value="<%=request.form("id")%>">
</form>
</td>
</tr>
<%
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
cx2.asp
<!--#include file="conn.asp"-->
<%
exec="select * from clwx where id="&request.form("id")
set rs=server.createobject("adodb.recordset")
rs.open exec,conn,1,3
rs("pjmc")=request.form("pjmc")
rs("clmc")=request.form("clmc")
rs("pjxh")=request.form("pjxh")
rs("jsr")=request.form("jsr")
rs("tyrq")=request.form("tyrq")
rs("wxrq")=request.form("wxrq")
rs("wxlx")=request.form("wxlx")
rs("gys")=request.form("gys")
rs("dj")=request.form("dj")
rs("sl")=request.form("sl")
rs("hjjg")=request.form("hjjg")
rs("gzms")=request.form("gzms")
rs("wxjl")=request.form("wxjl")
rs("ddls")=request.form("ddls")
rs("pjzl")=request.form("pjzl")
rs.update
Response.write"修改成功"
rs.close
set rs=nothing
conn.close
set conn=nothing
%>