ASP查询Access数据库报错 急该怎样做才对呀?解决思路
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="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"-->