错误类型:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver] 该特定字段 'vote_id' 可以参考 SQL 语句中 FROM 子句列表中的多个表。
/yidais/VoteSystem/huizong.asp, 第 97 行
浏览器类型:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) 网页:
GET /yidais/VoteSystem/huizong.asp 时间:
2009年2月24日, 10:25:12 
详细信息:
Microsoft 支持 huizong.asp代码如下:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="../Connections/votesystemconn.asp" -->
<%
Dim Recordset1
Dim Recordset1_numRowsSet Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_votesystemconn_STRING
Recordset1.Source = "SELECT * FROM voteTopic ORDER BY vote_id DESC"
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 1
Recordset1.Open()Recordset1_numRows = 0
%>
<%
Dim Recordset2
Dim Recordset2_numRowsSet Recordset2 = Server.CreateObject("ADODB.Recordset")
Recordset2.ActiveConnection = MM_votesystemconn_STRING
Recordset2.Source = "SELECT votecontent.votecontent_id,votecontent.vote_ID,  votecontent.vote_content,votetopic.vote_ID  FROM voteContent,votetopic  WHERE votecontent.vote_ID = votetopic.vote_ID  ORDER BY votecontent.votecontent_id ASC"
Recordset2.CursorType = 0
Recordset2.CursorLocation = 2
Recordset2.LockType = 1
Recordset2.Open()Recordset2_numRows = 0
%>
<%
Dim Repeat1__numRows
Dim Repeat1__indexRepeat1__numRows = -1
Repeat1__index = 0
Recordset1_numRows = Recordset1_numRows + Repeat1__numRows
%>
<%
'JomoWeb c2001 nstrpt1
function JomoPrefix(rs, fldName)
dim str, strlen, whereloc, orderloc
str = rs.source
strlen = Len(str)
whereloc=InStr(str," WHERE ")
orderloc=InStr(str," ORDER BY ")
if orderloc = 0 and whereloc = 0 then 
  JomoPrefix = str & " WHERE " & fldName & " = "
else
  if whereloc = 0 then
      JomoPrefix=Left(str,orderloc) & " WHERE " & fldName & " = "
  else
      if orderloc = 0 then orderloc = strlen
      JomoPrefix=Left(str,whereloc+6) &" ( " &  Mid(str, whereloc+7, orderloc - whereloc -6 ) & " )  AND " & fldName & " = "
  end if
end if
end functionfunction JomoPostfix(rs)
dim str, orderloc
str=rs.source
orderloc = InStr(str," ORDER BY ")
if orderloc = 0 then
  JomoPostfix = ""
else
JomoPostfix = " " & right(str, Len(str) - orderloc)
end if
end function
 %>
<% 
'JomoWeb c2001 nstrpt2
dim Recordset2_prefix, Recordset2_postfix
Recordset2_prefix = JomoPrefix(Recordset2, "vote_id")
Recordset2_postfix=JomoPostfix(Recordset2)
 %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head><body>
<% 
While ((Repeat1__numRows <> 0) AND (NOT Recordset1.EOF)) 
%>
  <table width="100%" border="0">
    <tr>
      <td><%=(Recordset1.Fields.Item("vote_title").Value)%></td>
    </tr>
    <%
'JomoWeb c2001 nstrpt3
if "Recordset2" <> "Recordset1" then
  Recordset2.close()
  if Recordset1.state = 1 then Recordset1_Fld = Recordset1("vote_id")
Recordset2.source = Recordset2_prefix & Recordset1_Fld & Recordset2_postfix
  Recordset2.open()
end if
while NOT Recordset2.EOF
 %><tr>
      <td><%=(Recordset2.Fields.Item("vote_content").Value)%></td>
    </tr>
    <%
'JomoWeb c2001 nstrpt4
Recordset2.moveNext()
wend
 %>
  </table>
  <% 
  Repeat1__index=Repeat1__index+1
  Repeat1__numRows=Repeat1__numRows-1
  Recordset1.MoveNext()
Wend
%>
</body>
</html>
<%
Recordset1.Close()
Set Recordset1 = Nothing
%>
<%
Recordset2.Close()
Set Recordset2 = Nothing
%>
我初学做网站,请各位多多指点,谢谢!