H
happycat1988
Unregistered / Unconfirmed
GUEST, unregistred user!
<%Dim connset conn=Server.CreateObject("ADODB.Connection")conn.open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("mydb.mdb")Dim rs1,rs2set rs1 = Server.CreateObject("ADODB.RecordSet")rs1.open "select * from area order by orderid",connset rs2 = Server.CreateObject("ADODB.RecordSet")%><table width="70%" border="1" align="center"><%Do While Not rs1.Eof%> <tr> <td width="30%"><%=rs1("areaname")%></td> <td><%=rs1("memo")%></td> </tr> <% rs2.open "select * from board where areaid=" & rs1("id") & " order by orderid",conn Do While Not rs2.Eof %> <tr> <td width="30%"><%=rs2("boardname")%></td> <td><%=rs2("memo")%></td> </tr> <% rs2.MoveNext Loop %><%rs1.MoveNextLoop%></table></html><%rs2.closers1.closeconn.Closeset rs2 = nothingset rs1 = nothingset conn = nothing%>执行的时候出错错误类型:ADODB.Recordset (0x800A0E79)对象打开时,不允许操作。在这行rs2.open "select * from board where areaid=" & rs1("id") & " order by orderid",conn我是用2个recordset分别显示2个表中的内容 他们之间有关联 所以用了嵌套循环 请问那里有错? 难道不能同时对数据库用2个recordset显示数据吗? 我是asp新手 会的请帮下