大战二郎神内容概括:asp中有关记录集的问题

来源:百度文库 编辑:神马品牌网 时间:2024/04/28 23:38:13
从两个表teach teacher中读取数据 其中两个表中都有字段name 且数据不同(即teach.name<>teacher.name) 那么记录集如何读取teach.name
我试过
while not rs.eof
response.write(Rs("teach.name")&"<br>")
rs.movenext
wend
虽然读出的数据都是表teach中的 但是为什么每条都循环了三遍?
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<link href="../css/link.css" rel="stylesheet" type="text/css">
<title>无标题文档</title>
</head>
<!--#include file="../txt/daohang.txt"--><body>
<%
if session("quanxian")="super" then
sqladmin="select * from teach,teacher"
opentypeadmin="3"
%>
<!-- #include file="../asp/asp_linkadmin.asp"-->
<%
while not rsadmin.eof
response.write(rsadmin("teach.name")&"<br>")
rsadmin.movenext
wend
response.end
%>
asp_linkadmin.asp 内容:
<%'连接数据库admin
set connadmin=Server.CreateObject("Adodb.Connection")
set rsadmin= Server.CreateObject("Adodb.Recordset")
connadmin.open "provider=microsoft.jet.oledb.4.0;data source="&server.mappath("../guanli_db/guanli.mdb")
rsadmin.open sqladmin,connadmin,1,opentypeadmin
%>

把你的整个页面全部代码给出好吗?