我写了段调用数据库的程序,能够正常显示出来。然后将classid=14改为16,其它都不变,也能正常显示出来。但如果把上面两个文件同时放在一个页面上却只能显示一个,谁放在前就显示谁,后面的就显示不到。郁闷之急啊!望高手给予解答下,万分地感谢感谢感谢! 代码如下: <% dim classid classid=14 %> <% set rs = server.createobject("adodb.recordset") sql="select * from T_Mulu2 where mulu1id="&classid&" order by Mulu2Order" rs.open sql,conn,1,1 %> <% nclassid2=rs("mulu2id") rs.close %>
< TABLE height=20 cellSpacing=0 cellPadding=0 width="100%" border=0> < TBODY> <%set rs1 = server.createobject("adodb.recordset") 'sql="select Mulu3,Mulu3id,Mulu2id from T_Mulu3 where mulu2id="&nclassid2&" order by Mulu3Order" sql="select * from article where nclassid=" + cstr(nclassid2) + " order by articleid desc" rs1.open sql,conn,1,1 'counts=1 'rs1.movefirst l=0 do while not rs1.eof %> < TR class=link> < TD width="8"> < IMG src="image/dot2.gif">< /TD> < TD width="200"><a href="juecelist.asp?id=<%=rs1("articleid")%>">< span class="link">< font color="#424242"><%=left(rs1("title"),15)&"..."%>< /font>< /span>< /a>< /TD> < /TR> <% l=l+1 if l>=10 then exit do end if rs1.movenext
loop rs1.close %> < /TBODY> < /TABLE>