错误类型:
Microsoft JET Database Engine (0x80040E14)
语法错误 (操作符丢失) 在查询表达式 'NewsId=' 中。
/newshow.asp, 第 8 行
<!--#include file="admin_ht/admin/inc/conn.asp"-->
<% dim newsid
newsid=request.QueryString("NewsId")
sql="select * from news where NewsId="&newsid
set rs=server.CreateObject("adodb.recordset")
set rs=conn.execute(sql)
%>
<%function HTMLEncode(fString)
fString = replace(fString,">" ,">" )
fString = replace(fString, "<","<" )
fString = Replace(fString," " ,CHR(32) )
fString = Replace(fString,"" , CHR(13))
fString = Replace(fString,"</P><P>" ,CHR(10) & CHR(10) )
fString = Replace(fString,"<BR>" ,CHR(10) )
HTMLEncode = fString
end function%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>新闻——详细内容</title>
<style type="text/css">
<!--
body,td,th {
font-family: 宋体;
font-size: 12px;
}
body {
background-image: url(images/bj.gif);
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
-->
</style>
<link href="images/css.css" rel="stylesheet" type="text/css">
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>
<style type="text/css">
<!--
.style4 {color: #8B4784}
-->
</style>
</head>
<body>
<table width="802" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="30" valign="bottom"><div align="center">
<p><FONT color=#671c39 size=2><%=rs("Title")%></FONT></p>
<p><FONT color=#671c39 size=2><B><span class="hui12">时间:<%=rs("Dateandtime")%><br>
</span><br>
</B></FONT></p>
</div></td>
</tr>
<tr>
<td class="hui12"><div align="center"><%=htmlencode(rs("Content"))%><br>
<br>
<br>
</div></td>
</tr>
</table></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><hr width="700" size="1" noshade></td>
</tr>
<tr>
<td></td>
</tr>
</table></td>
<td width="11" background="images/xian4.gif"> </td>
</tr>
</table>
</body>
</html>
提示错误:
<% dim newsid
newsid=request.QueryString("NewsId")
sql="select * from news where NewsId="&newsid
set rs=server.CreateObject("adodb.recordset")
set rs=conn.execute(sql)
%>
怎么修改呀!!!!!!!