日期:2014-05-17  浏览次数:20851 次

ASP查询Access数据库报错 急!!!该怎样做才对呀?
VBScript code

<!--#include file="include/conn1.asp"-->
<!--#include file="include/conn_znx.asp"-->

<style type="text/css">
.div_li{
float:left; height:160px; border:1px solid #cfdae8; width:410px; margin-left:-1px; margin-top:-1px;
/*list-style : none;url(example.gif) square inside;*/
}
ul { margin-left:1px; margin-top:1px; width:505px; }
li{list-style-type:none;}

</style>

<%
'response.write(session("username"))
dim zxzffs
dim zxzfje

zxzffs=request("zffs")
zxzfje=request("je")

dim rs
dim gsjs

dim zhwh

dim zxdtmc(5)
dim zxdtid(5)
dim i

dim hyalmc(6)
dim hyalid(6)

dim ozzhmc(6)
dim ozzhid(6)

dim jdwdmc(6)
dim jdwdid(6)

' 测试使用
dim jprrs '会员实体数据信息
dim jpruserbean '用户实体
dim jpruserid '会员ID
dim jprusername '会员姓名
dim jprage    '会员年龄
dim jprhigh '会员身高
dim jprweight '会员体重
dim jprtel '会员电话
dim jprdesc '会员自我描述
dim jpr_men(30) '所有男性信息
dim jpr_women(30) '所有女性信息

dim myhzp
dim wyhzp

dim sql_m    '顶部照片男
dim sql_w   '顶部照片女

dim rs_m
dim rs_w

dim wzzwmc  '网站名称

dim cgltp '成功率照片

'成功率图片
sql="select CGTP from FH_CGTP"
set rs=conn.execute(sql)

if Err.number<>0 then
   response.write(wrong)
end if

do while not rs.eof
    cgltp=rs("CGTP")
    rs.movenext
      if rs.eof then exit do
loop

rs.close
set rs=nothing


'网站名称
sql="select ZWMC from FH_WZMC"
set rs=conn.execute(sql)

if Err.number<>0 then
  response.write(wrong)
end if

do while not rs.eof
   wzzwmc=rs("ZWMC")
   rs.movenext
     if rs.eof then exit do
loop

rs.close
set rs=nothing


'顶部照片男
sql_m="select top 30 ZPDZ from FH_HYZP_SH where XB='0' and SYTP='1' and ZPDZ<>null"
set rs_m=conn_znx.execute(sql_m)


if Err.number<>0 then
   response.write(wrong)
end if

'顶部照片女
'sql_w="select top 30 ZPDZ from FH_HYZP_SH where XB='1' and SYTP='1' and ZPDZ<>null"
sql_w="select top 30 * from FH_HYZP_SH where XB='1' and SYTP='1' and ZPDZ<>null"
set rs_w=conn_znx.execute(sql_w)
if Err.number<>0 then
   response.write(wrong)
end if

'女性个人信息
do while not rs_w.eof
    if i= 30 then 
       exit do
    end if
    sql="select * from  FH_HYZC "  'where YHID='122"
    set jprrs=conn.execute(sql)
    for j=0 to 1
        if(j=1) then 
            exit do
        end if
        jpr_men(i)=jprrs
        if Err.number<>0 then
            response.write(wrong)
        end if
    next
    
    i=i+1
    rs_w.movenext
      if rs_w.eof then exit do
loop

dim zwnc



%>
<!--<meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">-->
<meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
<HTML>
  <HEAD>
    <TITLE><%=wzzwmc%>首页</TITLE>
  </HEAD>
  <script language="javascript" src="include/md5.js"></script>
 
  
  
  <BODY  leftmargin=0 topmargin=0>
  <center>
  <form name="main" action="" method="post">
    <TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0">
      <TR>
        <TD background="image/layout-sy-img-1-1.png" WIDTH="1004" HEIGHT="208">
          <embed src="swf/banner.swf" quality="high" 
                      pluginspage="http://www.macromedia.com/go/getflashplayer" 
                      type="application/x-shockwave-flash" width="1004" wmode="transparent" height="100%">
          </embed>
        </TD>
      </TR>
      <TR>
        <TD WIDTH="1004" HEIGHT="868">
            <TABLE BORDER="0" CELLSPACING