标题:下标越界问题求解决
只看楼主
sericsh
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2012-7-26
结帖率:0
已结贴  问题点数:20 回复次数:3 
下标越界问题求解决
登陆时提示如下:
Microsoft VBScript 运行时错误 错误 '800a0009'
下标越界: '[number: 86]'
/const.asp,行 107

const.asp文件代码如下:
<%
'On Error Resume Next
sql="select * from config"
set rs_config=conn.execute(sql)
dianming=rs_config("dianming")
jieshaojifen=rs_config("jieshaojifen")
xuhuijifen=rs_config("xuhuijifen")
baojin=rs_config("baojin")
baojin2=rs_config("baojin2")
dayin1=rs_config("dayin1")
dayin2=rs_config("dayin2")
showpic=rs_config("showpic")
maxrecord=rs_config("maxrecord")
maxproduit=rs_config("maxproduit")
tiqian=rs_config("tiqian")

sql="select * from login where username='"&session("shiwei_username")&"'"
set rs_login=conn.execute(sql)
quanxian=rs_login("quanxian")
fla=split(quanxian,",")
fla1=fla(0)
fla2=fla(1)
fla3=fla(2)
fla4=fla(3)
fla5=fla(4)
fla6=fla(5)
fla7=fla(6)
fla8=fla(7)
fla9=fla(8)
fla10=fla(9)
fla11=fla(10)
fla12=fla(11)
fla13=fla(12)
fla14=fla(13)
fla15=fla(14)
fla16=fla(15)
fla17=fla(16)
fla18=fla(17)
fla19=fla(18)
fla20=fla(19)
fla21=fla(20)
fla22=fla(21)
fla23=fla(22)
fla24=fla(23)
fla25=fla(24)
fla26=fla(25)
fla27=fla(26)
fla28=fla(27)
fla29=fla(28)
fla30=fla(29)
fla31=fla(30)
fla32=fla(31)
fla33=fla(32)
fla34=fla(33)
fla35=fla(34)
fla36=fla(35)
fla37=fla(36)
fla38=fla(37)
fla39=fla(38)
fla40=fla(39)
fla41=fla(40)
fla42=fla(41)
fla43=fla(42)
fla44=fla(43)
fla45=fla(44)
fla46=fla(45)
fla47=fla(46)
fla48=fla(47)
fla49=fla(48)
fla50=fla(49)
fla51=fla(50)
fla52=fla(51)
fla53=fla(52)
fla54=fla(53)
fla55=fla(54)
fla56=fla(55)
fla57=fla(56)
fla58=fla(57)
fla59=fla(58)
fla60=fla(59)
fla61=fla(60)
fla62=fla(61)
fla63=fla(62)
fla64=fla(63)
fla65=fla(64)
fla66=fla(65)
fla67=fla(66)
fla68=fla(67)
fla69=fla(68)
fla70=fla(69)
fla71=fla(70)
fla72=fla(71)
fla73=fla(72)
fla84=fla(73)
fla85=fla(74)
fla86=fla(75)
fla87=fla(76)
fla88=fla(77)
fla89=fla(78)
fla80=fla(79)
fla81=fla(80)
fla82=fla(81)
fla83=fla(82)
fla84=fla(83)
fla85=fla(84)
fla86=fla(85)
fla87=fla(86)
fla88=fla(87)
fla89=fla(88)
fla90=fla(89)
fla91=fla(90)
fla92=fla(91)
fla93=fla(92)
fla94=fla(93)
fla95=fla(94)
fla96=fla(95)
%>
<!--#include file="inc/SF_Sql.asp"-->

asp菜鸟,求各位朋友帮忙看下,感激不尽!
搜索更多相关主题的帖子: 越界 107 Microsoft 
2012-07-26 11:23
cnfarer
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:179
帖 子:3330
专家分:21157
注 册:2010-1-19
得分:7 
大概是fla=split(quanxian,",")产生的数组没有那么大。

★★★★★为人民服务★★★★★
2012-07-27 06:51
yms123
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:209
帖 子:12488
专家分:19042
注 册:2004-7-17
得分:7 
fla1=fla(0)
fla2=fla(1)
fla3=fla(2)
fla4=fla(3)
fla5=fla(4)
fla6=fla(5)
fla7=fla(6)
fla8=fla(7)
fla9=fla(8)
fla10=fla(9)
fla11=fla(10)
fla12=fla(11)
fla13=fla(12)
fla14=fla(13)
fla15=fla(14)
fla16=fla(15)
fla17=fla(16)
fla18=fla(17)
fla19=fla(18)
fla20=fla(19)
fla21=fla(20)
fla22=fla(21)
fla23=fla(22)
fla24=fla(23)
fla25=fla(24)
fla26=fla(25)
fla27=fla(26)
fla28=fla(27)
fla29=fla(28)
fla30=fla(29)
fla31=fla(30)
fla32=fla(31)
fla33=fla(32)
fla34=fla(33)
fla35=fla(34)
fla36=fla(35)
fla37=fla(36)
fla38=fla(37)
fla39=fla(38)
fla40=fla(39)
fla41=fla(40)
fla42=fla(41)
fla43=fla(42)
fla44=fla(43)
fla45=fla(44)
fla46=fla(45)
fla47=fla(46)
fla48=fla(47)
fla49=fla(48)
fla50=fla(49)
fla51=fla(50)
fla52=fla(51)
fla53=fla(52)
fla54=fla(53)
fla55=fla(54)
fla56=fla(55)
fla57=fla(56)
fla58=fla(57)
fla59=fla(58)
fla60=fla(59)
fla61=fla(60)
fla62=fla(61)
fla63=fla(62)
fla64=fla(63)
fla65=fla(64)
fla66=fla(65)
fla67=fla(66)
fla68=fla(67)
fla69=fla(68)
fla70=fla(69)
fla71=fla(70)
fla72=fla(71)
fla73=fla(72)
fla84=fla(73)
fla85=fla(74)
fla86=fla(75)
fla87=fla(76)
fla88=fla(77)
fla89=fla(78)
fla80=fla(79)
fla81=fla(80)
fla82=fla(81)
fla83=fla(82)
fla84=fla(83)
fla85=fla(84)
fla86=fla(85)
fla87=fla(86)
fla88=fla(87)
fla89=fla(88)
fla90=fla(89)
fla91=fla(90)
fla92=fla(91)
fla93=fla(92)
fla94=fla(93)
fla95=fla(94)
fla96=fla(95)
不明白你上面的split已经散列为数组了还要写这些做什么?
还有就是你确定你散列的一定有95个元素吗?
数组要用UBound函数来检测一下数组有多少个元素
你散列之后

UBound(fla)
求一下数组的元素个数
2012-07-27 09:43
netlin
Rank: 13Rank: 13Rank: 13Rank: 13
等 级:贵宾
威 望:24
帖 子:544
专家分:4308
注 册:2012-4-9
得分:7 
楼主要变通一下编程的思路!

做自己喜欢的事!
2012-07-28 14:23



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




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

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