标题:ASP 代码 谁可以帮忙修改一下?急 急
只看楼主
Lilongjuan
Rank: 1
等 级:新手上路
帖 子:13
专家分:0
注 册:2011-5-3
结帖率:50%
已结贴  问题点数:10 回复次数:10 
ASP 代码 谁可以帮忙修改一下?急 急
提示错误第三行缺少对象:''
<!--include file="conn.asp"-->
<%
set rss=conn.execute("select * from test order by examinationid desc")
pd=rss("rightorwrongid")
pds=rss("rightorwrongscore")
xz=rss("selectid")
xzs=rss("selectscore")
tk=rss("fillingid")
tks=rss("fillingscore")
zf=pd*pds+xz*xzs+tk*tks
testid=rss("examinationid")

set rs=conn.execute("select  * from rightorwrong order  by rightorwrongid desc")
maxtype1=rs("rightorwrongid")
set rs=conn.execute("select  * from selecting order by selectid desc")
maxtype2=rs("selectid")
set rs=conn.execute("select  * from filling order by fillingid desc")
maxtype3=rs("fillingid")


%>




<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>第 期考试</title>
</head>

<body>

<form name=form1 action=" test_over.asp">
   
     <input type=hidden name=tks value=<%=tks%>>            
     <input type=hidden name=xzs value=<%=xzs%>>  
     <input type=hidden name=pds value=<%=pds%>>  
     <input type=hidden name=zf value=<%=zf%>>  
     <input type=hidden name=tk value=<%=tk%>>  
     <input type=hidden name=xz value=<%=xz%>>  
     <input type=hidden name=pd value=<%=pd%>>  
   
    <table border="1" cellpadding="4" cellspacing="0" width="80%"  height="486" align=center>
        <tr>
            <td align="center"><font class=test1>第 <%=qi%> 期考试</font>
    <input type="hidden" name=qi value=<%=qi%>>  
    <input type=hidden name=testid value=<%=testid%>>  
     <br>(本期考试 <%=pd%> 道判断题,<%=xz%>  道选择题,<%=tk%> 道填空题,总分 <%=zf%> 分)</br>            
     <br align="center">考生姓名:<%=session("student")%>&nbsp;&nbsp; 性别:<%=session("sex")%> &nbsp;班级:<%=session("classes")%>&nbsp;&nbsp;学号:<%=session("number")%> </br>
            
            <table border="1" width="99%"  cellpadding="5" cellspacing="0">
                <tr>
                    <td bgcolor=#9999FF>一、判断题(共&nbsp;<%=pd%> 道,每题&nbsp;<%=pds%> 分)</td>
                </tr>
                 <%  
                        if pd=0 then  
                            response.write "<input type=hidden name=messagepd value='本次考无判断题'>"  
                            flagpd=0  
                %>
                <tr>
                    <td>本次考试无判断题</td>
                </tr>
                <%  
  
                        else  
                            for i=1 to pd  
                            if maxtype1=0 then  
                                response.write "<input type=hidden name=messagepd value='题库里暂无判断题'>"  
                                flagpd=0  
                %>
                <tr>
                    <td>题库里暂无判断题</td>
                </tr>
                <%  
  
                        else  
      
                            randomize  
                            sid=int(maxtype1*rnd+1)  
                            set rst=conn.execute("select * from rightorwrong where rightorwrongid="&sid)        
                            while rst.eof  
                                randomize  
                                sid=int(maxtype1*rnd+1)  
                                  set rst=conn.execute("select * from rightorwrong where rightorwrongid="&sid)  
                        wend  
                  %>  
                <tr>
                    <td>&nbsp;&nbsp;&nbsp; <%=i%>、<%=rst("question")%>
                    <input type=hidden name="tgpd<%=i%>" value="<%=rst("question")%>">
                    <select name="cate<%=i%>" size="1" style="background-color: rgb(224,252,255)">  
                    <option selected value=True>对</option>  
                    <option value=False>错</option></select>  
                    <input type=hidden name="pdda<%=i%>" value="<%=rst("answer")%>">  
                    </select></td>
                </tr>
                <%  
                        end if   
                    next  
                end if %>
            </table>
            <br></br>
            <table border="1" width="99%" cellpadding="5" cellspacing="0">
                <tr>
                    <td bgcolor=#9999FF>一、选择题(共&nbsp; <%=xz%> 题,每题&nbsp;  <%=xzs%>分)</td>
                </tr>
                  <%if xz=0 then  
                      response.write "<input type=hidden name=messagepd value='本次考无选择题'>"  
                    flagxz=0  
                %>               
                <tr>
                    <td>本次考试无选择题</td>
                </tr>
                <%else  
                    for i=1 to xz  
                    if maxtype2=0 then  
                      response.write "<input type=hidden name=messagepd value='题库里暂无选择题'>"  
                    flagxz=0  
                %>
                <tr>
                    <td>题库里暂无选择题</td>
                </tr>
                <%else  
                    randomize  
                    sid=int(maxtype2*rnd+1)  
                    set rst=conn.execute("select * from selecting where selectid="&sid)  
                    while rst.eof  
                    randomize  
  
                    sid=int(maxtype2*rnd+1)  
                    set rst=conn.execute("select * from selecting where selectid="&sid)  
      
                    wend  
                %>  

                <tr>
                    <td> <%=i%>&nbsp;&nbsp; 、<%=rst("question")%><input type=hidden name="tgxz<%=i%>" value="<%=rst("question")%>"></td>
                </tr>
               
                <tr>
                    <td>
                    <input  type="radio" value="A" name="sele<%=i%>"> A.<%=rst("result1")%>&nbsp;&nbsp;  
                    <input type=hidden name="xzxx1<%=i%>" value="<%=rst("result1")%>" >   
  
                    <input  type="radio" value="B" name="sele<%=i%>"> B.<%=rst("result2")%>&nbsp;  
                    <input type=hidden name="xzxx2<%=i%>" value="<%=rst("result2")%>" >   
              
                    <input  type="radio" value="C" name="sele<%=i%>"> C.<%=rst("result3")%>&nbsp;&nbsp;  
                       <input type=hidden name="xzxx3<%=i%>" value="<%=rst("result3")%>" >   
  
                    <input  type="radio" value="D" name="sele<%=i%>"> D.<%=rst("result4")%>   
                    <input type=hidden name="xzxx4<%=i%>" value="<%=rst("result4")%>" >   
  
                    <input type=hidden name="xzda<%=i%>" value="<%=rst("answer")%>" >
                    </td>
                </tr>
                <%  
                    end if   
                    next  
                end if %>
            </table>
            <br> </br>
            <table border="1" width="99%" cellpadding="5" cellspacing="0">
                <tr>
                    <td bgcolor=#9999FF>一、填空题(共&nbsp;<%=tks%> 题,每题&nbsp;<%=tks%> 分)</td>
                </tr>
                <%if tk=0 then  
                      response.write "<input type=hidden name=messagepd value='本次考无填空题'>"  
                flagtk=0  
                    %>
                <tr>
                    <td>本次考试无填空题</td>
                </tr>
                <%else  
                    for i=1 to tk
                    if maxtype3=0 then  
                      response.write "<input type=hidden name=messagepd value='题库里暂无填空题'>"  
                    flagtk=0  
                %>
                <tr>
                    <td>题库里暂无填空题</td>
                </tr>
                <%else  
                    randomize  
                    sid=int(maxtype3*rnd+1)  
                    set rst=conn.execute("select * from filling where fillingid="&sid)  
                    while rst.eof  
                    randomize  
  
                    sid=int((maxtype3+1)*rnd+1)  
                    set rst=conn.execute("select * from filling where fillingid="&sid)  
                         wend  
                %>  

                <tr>
                    <td>&nbsp;&nbsp;&nbsp; <%=i%>、<%=rst("question")%>
                    <input type=hidden name="tgtk<%=i%>" value="<%=rst("question")%>">
                    您的答案:<input type="text" name="T<%=i%>" size="31" class="line"></td>  
                    <input type="hidden" name="tkda<%=i%>" value="<%=rst("answer")%>">
                    </td>
                </tr>
            <%  
                    end if   
                next  
                end if %>
            </table>            
            </td>
        </tr>
    </table>
    <p align="center"><input type="submit" value="提交" name="B1" size=10>
    <input type="reset" value="重置" name="B2"></p>
</form>

</body>

</html>

[ 本帖最后由 Lilongjuan 于 2011-5-3 14:44 编辑 ]
搜索更多相关主题的帖子: test 
2011-05-03 14:26
Lilongjuan
Rank: 1
等 级:新手上路
帖 子:13
专家分:0
注 册:2011-5-3
得分:0 
谁有asp修改密码的简单的代码,可以借鉴一下不?
2011-05-03 14:28
yms123
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:209
帖 子:12488
专家分:19042
注 册:2004-7-17
得分:0 
具体出错代码在哪?
2011-05-03 15:17
dzt0001
Rank: 13Rank: 13Rank: 13Rank: 13
等 级:蒙面侠
威 望:5
帖 子:1281
专家分:4998
注 册:2005-10-12
得分:10 

不能确定是这个页面还是conn.asp出错。

请给出错提示的全部内容。

----我怎能在别人的苦难面前转过脸去----
2011-05-03 16:11
DanYang_dan
Rank: 5Rank: 5
来 自:西安
等 级:职业侠客
帖 子:114
专家分:383
注 册:2011-4-14
得分:0 
......不知道你到底错哪

花依然很美、我们依旧幸福
                         丹扬、
2011-05-03 16:17
Lilongjuan
Rank: 1
等 级:新手上路
帖 子:13
专家分:0
注 册:2011-5-3
得分:0 
回复 3楼 yms123
就是这个页面的第四行。我这个页面的功能是在线考试的页面。如有需要可以将数据库发给你帮忙调试一下
2011-05-03 22:01
Lilongjuan
Rank: 1
等 级:新手上路
帖 子:13
专家分:0
注 册:2011-5-3
得分:0 
回复 4楼 dzt0001
是这个页面的。提示是错误类型:
Microsoft VBScript 运行时错误 (0x800A01A8)
缺少对象: ''
/h/test.asp, 第 4 行
2011-05-03 22:02
dzt0001
Rank: 13Rank: 13Rank: 13Rank: 13
等 级:蒙面侠
威 望:5
帖 子:1281
专家分:4998
注 册:2005-10-12
得分:0 
仔细看看第一句漏了什么字符!细心细心!

----我怎能在别人的苦难面前转过脸去----
2011-05-04 09:48
DanYang_dan
Rank: 5Rank: 5
来 自:西安
等 级:职业侠客
帖 子:114
专家分:383
注 册:2011-4-14
得分:0 
是不是少了
set rss = server.recordset("adodbset")

花依然很美、我们依旧幸福
                         丹扬、
2011-05-04 13:48
dzt0001
Rank: 13Rank: 13Rank: 13Rank: 13
等 级:蒙面侠
威 望:5
帖 子:1281
专家分:4998
注 册:2005-10-12
得分:0 
还是明说了吧 <!-- #include file="conn.asp" -->

----我怎能在别人的苦难面前转过脸去----
2011-05-04 14:16



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-338648-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.073414 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved