asp access 语法错误 (操作符丢失) 在查询表达式 'sort_id=' 中

来源:百度知道 编辑:UC知道 时间:2024/05/19 10:52:22
在两个表中找出相同的值分组,循环输出(同一组的只取一个)
提示错误为:Microsoft JET Database Engine 错误 '80040e14'
语法错误 (操作符丢失) 在查询表达式 'sort_id=' 中。
就是 rs_sort.open "select * from class2 where sort_id="&rs_ground("sort"),con,1,1%>这一行

我把"&rs_ground("sort") 改为'"&rs_ground("sort")
提示错误为:Microsoft JET Database Engine 错误 '80040e14'
字符串的语法错误 在查询表达式 'sort_id='24' 中.

高手帮帮忙吧!

<%set res=server.createobject("adodb.recordset")
res.open "select * from class",con,1,1
while not res.eof%>
<tr>
<td width="130" height="20" bgcolor="99FFcc">
<STRONG><img src="img/iecool_arrow_021.gif" width="12" height="8" border="0"></STRONG>
<b><a href="product?sort_idlei=<%=res("sort_id")%>&

代码。
<% dim PinPaidaId
set rss=server.createobject("ADODB.Recordset")
rss.open "select PinPaidaId,PinPaidaMing from PinPaida order by PinPaidaid",conn,1,1

do while not rss.eof
PinPaidaId=rss("PinPaidaId")
%>
<option value="<%=rss("PinPaidaId")%>">--<%=rss("PinPaidaMing")%></option>
<%
set rss1=server.createobject("ADODB.Recordset")
rss1.open "select PinPaiId,PinPaiMing,PinPaidaId from PinPai where PinPaidaId="&PinPaidaId&" order by PinPaiMing",conn,1,1
do while not rss1.eof
%>
<option value="<%=rss1("PinPaiId")%>"> <%=rss1("PinPaiMing")%></option>
<%