| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 540 人关注过本帖
标题:求助!页面打不开!看需要改哪里?谢谢
只看楼主 加入收藏
martialarts
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2013-12-23
收藏
 问题点数:0 回复次数:1 
求助!页面打不开!看需要改哪里?谢谢
帮忙看看这上页面

<%@ Language=VBScript %>
<% Response.Expires = 0 %>
<!-- #include file="../share/connectdb.asp"  -->
<%
mc=replace(Request.Form("mc"),"'","''")
sql="select * from zdgwlb where mc='" & mc & "'"
set rs=conn.execute(sql)
mc = Request.Form("mc")

if not rs.eof and not rs.bof then %>
   <P><font size="2" color="#FF0000" ><b>已有此名称类别,请返回重新填写!</b></font></p>
   <P><img src="images/fh.gif" width="67" height="22" border="0" onclick="javascript:history.back()" style="cursor:hand">
<% Response.End

else

set rs=nothing
   '求最大编号
   sql="select max(cInt(xh)) as id from zdgwlb"
   set rs=conn.execute(sql)
   
   if isnull(rs("id")) then
      id=1
   else
 
   '判断最大号是否为99
   if rs("id")=99 then
         
      sql="select * from zdgwlb where cint(xh)<99 order by xh asc"
      set rs1=conn.execute(sql)
      
     
      if rs1.eof and rs1.bof then
         id=1
      else      
         do while not rs1.eof
         
            aa=Cint(rs1("xh"))+1
            sql="select * from zdgwlb where cint(xh)=" & aa
            set rs2=conn.execute(sql)
            if rs2.bof and rs2.eof then
               id=aa
               exit do            
            else
               sql="select * from zdgwlb where cint(xh)=" & aa-1
               set rs3=conn.execute(sql)
               if rs3.bof and rs3.eof then
                  id=aa-2
                  exit do               
               end if        
               rs3.close
               set rs3=nothing            
            end if
            rs2.close
            set rs2=nothing         
            rs1.movenext
            loop
      end if
      rs1.close
      set rs1=nothing
   else
      id=rs("id")+1
   end if
   
   end if
   set rs=nothing
   
   if id="" or id<0 then %>
   <P><font size="2" color="#FF0000" ><b>类别数最大为99,无法再增加类别!</b></font></p>
<%
   Response.End
   end if
   
    '存入
    set rsSave=CreateObject("adodb.recordset")
    rsSave.Open "zdgwlb",Conn,3,2
    rsSave.AddNew
    rsSave("xh")=id
    rsSave("mc")=mc
    rsSave.Update
    rsSave.Close
    set rsSave=nothing


   '刷新显示
   
    Response.Redirect "lb_weihu.asp"

set rs=nothing
Conn.Close
Set Conn = Nothing

end if
%>
搜索更多相关主题的帖子: replace javascript include images border 
2013-12-23 23:22
martialarts
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2013-12-23
收藏
得分:0 
问题已经解决!不好意思,我发现是里面用到的参数我都没有定义!
在<%dim mc,xh....后问题解决!
2013-12-26 12:42
快速回复:求助!页面打不开!看需要改哪里?谢谢
数据加载中...
 
   



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

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