读书人

ASP查询Access数据库报错 急该怎样做才

发布时间: 2012-04-20 15:27:03 作者: rapoo

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 zxzffsdim zxzfjezxzffs=request("zffs")zxzfje=request("je")dim rsdim gsjsdim zhwhdim zxdtmc(5)dim zxdtid(5)dim idim hyalmc(6)dim hyalid(6)dim ozzhmc(6)dim ozzhid(6)dim jdwdmc(6)dim jdwdid(6)' 测试使用dim jprrs '会员实体数据信息dim jpruserbean '用户实体dim jpruserid '会员IDdim jprusername '会员姓名dim jprage    '会员年龄dim jprhigh '会员身高dim jprweight '会员体重dim jprtel '会员电话dim jprdesc '会员自我描述dim jpr_men(30) '所有男性信息dim jpr_women(30) '所有女性信息dim myhzpdim wyhzpdim sql_m    '顶部照片男dim sql_w   '顶部照片女dim rs_mdim rs_wdim wzzwmc  '网站名称dim cgltp '成功率照片'成功率图片sql="select CGTP from FH_CGTP"set rs=conn.execute(sql)if Err.number<>0 then   response.write(wrong)end ifdo while not rs.eof    cgltp=rs("CGTP")    rs.movenext      if rs.eof then exit dolooprs.closeset rs=nothing'网站名称sql="select ZWMC from FH_WZMC"set rs=conn.execute(sql)if Err.number<>0 then  response.write(wrong)end ifdo while not rs.eof   wzzwmc=rs("ZWMC")   rs.movenext     if rs.eof then exit dolooprs.closeset 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 doloopdim 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="0" CELLPADDING="0" WIDTH="1004" HEIGHT="868">                <TR>                  <TD background="image/layout-sy-img-1-1-1.png" WIDTH="1004" HEIGHT="10"></TD>                </TR>                <TR>                  <TD  WIDTH="1004" HEIGHT="256">                    <table BORDER="0" CELLSPACING="0" CELLPADDING="0" WIDTH="1004" HEIGHT="256">                      <tr>                        <td width=40>                        </td>                        <td width=924 height=156>                         <marquee  width=924 height=146 align=mmiddle direction="right" behavior=alternate loop=-1 scrollamount=3 scrolldelay=3 hspace=8 vspace=5 onMouseOver="this.stop()" onMouseOut="this.start()">                         <%                               do while not rs_w.eof                                 wyhzp=rs_w("ZPDZ")                                 jpruserid=rs_w("YHID")                                 response.write("hello")                                 jprsql="select NM from FH_HYZC where YHID='" & jpruserid                                 set jpruserbean=conn.execute(jprsql)                                 if Err.number<>0 then                                    response.write(wrong)                                 end if                                 jprusername = jpruserbean("NM")                         %>                                     <img src="<%=wyhzp%>" alt="<%=jprusername%>" width=130 height=140>                        <%                                rs_w.movenext                                                                    if rs_w.eof then exit do                                                                 loop                               rs_w.close                               set rs_w=nothing                        %>                        </marquee>                                                <%                               do while not jprrs.eof                         %>                                     <b>我的姓名:<%=jprrs("NM")%>,母语:<%=jprrs("MY")%>,体重:<%=jprrs("TZ")%>Kg,身高<%=jprrs("SG")%>cm.简要描述:<%=jprrs("GXSM")%></b><br/>                                    我的联系方式:手机(<%=jprrs("SJHM")%>),座机(<%=jprrs("DHHM")%>),Email(<%=jprrs("YHMSN")%>|<%=jprrs("MSN")%>)<br/>                        <%                                jprrs.movenext                                                                    if jprrs.eof then exit do                                                                 loop                               jprrs.close                               set jprrs=nothing                        %>                        </td>                        <td width=40>                        </td>                      </tr>                    </table>                    <!--Test Start-->                        <div style="width:924;height:100px;border:1px solid red;margin-left:40px;" >                            <%                            for i=1 to 10                            %>                            <li class="div_li"><%=i&" love "&(i+1)  %><li>                            <%                            next                            %>                        </div>                    <!--Test End-->                  </TD>                </TR>                。。。。。。。    </center>   </BODY></HTML><!--#include file="include/disconn_znx.asp"--><!--#include file="include/disconn.asp"--> 



其中'女性个人信息处(顶部)
sql="select * from FH_HYZC where YHID=" & rs_w("YHID")
set jprrs=conn.execute(sql) '报错信息是乱码,看不出来,其他代码行都没问题
这段代码报错,是哪里错了呀,我就查询一行记录出来,求解!!!!

[解决办法]
ID []

读书人网 >ASP

热点推荐