对以上问题重新整理,请大家帮忙……
技术信息(用于支持人员)
错误类型:
Microsoft JET Database Engine (0x80040E14)
语法错误 (操作符丢失) 在查询表达式 'where id=8' 中。
/admin/xgsave.asp, 第 11 行
错误提示是ID已经传递过来,怎么回事?
以下是代码……
修改验证页:xgsave.asp
<!--#include file="conn.asp"-->
<%
dim id
id=trim(request.form("id"))
if request("action")="xg" then
set rs=server.createobject("adodb.recordset")
sql="select * from AllHotel where where id="&request("id")
rs.open sql,conn,2,3 '这里是第11行
M_Txt1=request.form("M_Txt1")
M_Txt2=request.form("M_Txt2")
M_Txt3=request.form("M_Txt3")
M_Txt4=request.form("M_Txt4")
M_Txt5=request.form("M_Txt5")
M_Txt6=request.form("M_Txt6")
M_Txt7=request.form("M_Txt7")
M_Txt8=request.form("M_Txt8")
M_Txt9=request.form("M_Txt9")
M_Txt10=request.form("M_Txt10")
M_Txt11=request.form("M_Txt11")
M_Txt12=request.form("M_Txt12")
M_Txt13=request.form("M_Txt13")
M_Txt14=request.form("M_Txt14")
M_Txt15=request.form("M_Txt15")
M_Txt16=request.form("M_Txt16")
M_Txt17=request.form("M_Txt17")
M_Txt18=request.form("M_Txt18")
M_Txt19=request.form("M_Txt19")
M_Txt19=replace(M_Txt19,vbcrlf,"<br>")
M_Txt20=request.form("M_Txt20")
M_Txt21=request.form("M_Txt21")
M_Txt22=request.form("M_Txt22")
M_Txt23=request.form("M_Txt23")
M_Txt24=request.form("M_Txt24")
M_Txt24=replace(M_Txt24,vbcrlf,"<br>")
M_Txt25=request.form("M_Txt25")
M_Txt25=replace(M_Txt25,vbcrlf,"<br>")
M_Txt26=request.form("M_Txt26")
M_Txt26=replace(M_Txt26,vbcrlf,"<br>")
M_Txt27=request.form("M_Txt27")
M_Txt28=request.form("M_Txt28")
M_Txt29=request.form("M_Txt29")
M_Txt30=request.form("M_Txt30")
M_Txt31=request.form("M_Txt31")
M_Txt31=replace(M_Txt31,vbcrlf,"<br>")
M_Txt32=request.form("M_Txt32")
M_Txt32=replace(M_Txt32,vbcrlf,"<br>")
M_Txt33=request.form("M_Txt33")
M_Txt33=replace(M_Txt33,vbcrlf,"<br>")
M_Txt34=request.form("M_Txt34")
M_Txt34=replace(M_Txt34,vbcrlf,"<br>")
M_Txt35=request.form("M_Txt35")
M_Txt35=replace(M_Txt35,vbcrlf,"<br>")
M_Txt36=request.form("M_Txt36")
M_Txt36=replace(M_Txt36,vbcrlf,"<br>")
M_Txt37=request.form("M_Txt37")
M_Txt37=replace(M_Txt37,vbcrlf,"<br>")
M_Txt38=request.form("M_Txt38")
M_Txt38=replace(M_Txt38,vbcrlf,"<br>")
M_Txt39=request.form("M_Txt39")
M_Txt39=replace(M_Txt39,vbcrlf,"<br>")
M_Txt40=request.form("M_Txt40")
M_Txt41=request.form("M_Txt41")
M_Txt42=request.form("M_Txt42")
M_Txt43=request.form("M_Txt43")
M_Txt44=request.form("M_Txt44")
M_Txt45=request.form("M_Txt45")
M_Txt46=request.form("M_Txt46")
M_Txt47=request.form("M_Txt47")
M_Txt47=replace(M_Txt47,vbcrlf,"<br>")
rs("img1")=M_Txt1
rs("img2")=M_Txt2
rs("img3")=M_Txt3
rs("img4")=M_Txt4
rs("img5")=M_Txt5
rs("img6")=M_Txt6
rs("img7")=M_Txt7
rs("img8")=M_Txt8
rs("img9")=M_Txt9
rs("title")=M_Txt10
rs("bz")=M_Txt11
rs("leibie")=M_Txt12+M_Txt13+M_Txt14+M_Txt15+M_Txt16+M_Txt17+M_Txt18
rs("intr")=M_Txt19
rs("hoteladd")=M_Txt20
rs("bdpri")=M_Txt21
rs("bspri")=M_Txt22
rs("tfpri")=M_txt23
rs("room")=M_txt24
rs("meeting")=M_txt25
rs("things")=M_txt26
rs("zaoc")=M_txt27
rs("zhc")=M_txt28
rs("zzc")=M_txt29
rs("hycd")=M_txt30
rs("meetingeat")=M_txt31
rs("play")=M_txt32
rs("circle")=M_txt33
rs("techan")=M_txt34
rs("free")=M_txt35
rs("youhui")=M_txt36
rs("taop")=M_txt37
rs("countup")=M_txt38
rs("jtong")=M_txt39
rs("ren")=M_txt40
rs("tel")=M_txt41
rs("fax")=M_txt42
rs("mail")=M_txt43
rs("site")=M_txt44
rs("opendate")=M_txt45
rs("lastchange")=M_txt46
rs("other")=M_txt47
rs("xgip")=request.servervariables("remote_addr")'记录注册ip
rs("xgtime")=date()'=在数据库里插入当前的时间,格式为年,月,日
rs("xgid")=session("name")
rs.update
rs.close
conn.close
set rs=nothing
end if
'===========================================修改结束=============================
%>
<html>
<head>
<link href="../Meeting/style.css" rel="stylesheet" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
body,td,th {
font-family: Arial, Helvetica, sans-serif;
font-size: 16px;
}
a {
font-family: Arial, Helvetica, sans-serif;
font-size: 16px;
}
-->
</style></head>
<body>
<div align="center">
<p>恭喜!数据修改成功</p>
<p><input name="retun" type="button" onClick="javascript:window.history.go(-1)" value="返回" size="3"></p>
</div>
</body>
</html>
表单传递的页面部分代码……xginfo.asp
<!--#include file="top.asp" -->
<table width="600" align="center" cellpadding="3" cellspacing="1" bgcolor="#009933">
<form name="form3" id="form3" method="post" action="roomxgave.asp?action=xg&id=<%=(Rs.Fields.Item("id").Value)%>">
<tr>
.......中间略.....
</tr>
</form>
</table>
请大家帮忙……谢谢!
[此贴子已经被作者于2006-7-13 17:02:27编辑过]