分类：电脑/网络-互联网
问题：本机调试ASP，下标越界。提示代码63行错误，请高手相助！代码如 
代码如下:<%@LANGUAGE="SCRIPT"CODEPAGE="936"%><%'强制要求显式声明脚本中的所有变量OptionExplicitResponse.Buffer=TrueResponse.Expires=0Server.ScriptTimeOut=600'秒%><!--#includefile="../ p"--><!--#includefile="../ p"--><!--#includefile="../Database/ c"--><%dimrs,sql,x,代码如下:<%@LANGUAGE="SCRIPT"CODEPAGE="936"%><%'强制要求显式声明脚本中的所有变量OptionExplicitResponse.Buffer=TrueResponse.Expires=0Server.ScriptTimeOut=600'秒%><!--#includefile="../ p"--><!--#includefile="../ p"--><!--#includefile="../Database/ c"--><%dimrs,sql,x,i,sTmp,iTmp'检查用户做题量是否符合条件ifCInt(Request("hSelExamCount"))<1thenResponse.Write("<script>alert('本试卷题目还没有做完!')</"&"script>")'Response.Write(Request.Form)Response.End()else'分析用户选择的试题'Fori=0toRequest.Form.Count-1'Conn.RollbackTrans()Conn.BeginTrans() rm'if(Left(x,2)="A_")or((Left(x,2)="B_"))or((Left(x,2)="C_"))or((Left(x,2)="D_"))then'response.writex&"|"&Request.Form(x)&"<hr>"'endifSelectCaseLeft(x,2)Case"A_"'单选sTmp=Split(Request.Form(x),",")Fori=0toUBound(sTmp)ifIsNumeric(sTmp(i))thenaddDataRequest.Form("CID_"&x),Mid(x,3),"A",sTmp(i),""endifNextCase"B_"'多选的分数按选项值累计sTmp=Split(Request.Form(x),",")iTmp=0Fori=0toUBound(sTmp)ifIsNumeric(sTmp(i)) (sTmp(i))NextaddDataRequest.Form("CID_"&x),Mid(x,3),"B",iTmp,""Case"C_"'判断addDataRequest.Form("CID_"&x),Mid(x,3),"C",Request.Form(x),""Case"D_"'问答题addDataRequest.Form("CID_"&x),Mid(x,3),"D",0,checkin(Request.Form(x))EndSelectNext'记住用户sql="InsertIntoPaperUser(ExamID,UserID)Values("&Request.Form("hExamID")&",'"&Request.Form("hUserID")&"')"Conn.Execute(sql)WriteMsg("<script>alert('答题完成,谢谢您的参与!'); ose();</"&"script>")Conn.CommitTrans()CloseRS()Response.End()endif'增加考试数据RLX=试题类型ABCDSubaddData(ClassID,RID,RLX,RFS,RWDNR)dimrsAdd,rsSqlrsSql="InsertIntoExamData(ExamID,ExamName,Examinee,DeptID,[LevelID],ServiceTime,Sex,Age,Education,"&_"CatalogID,RubricID,RubricType,RubricPoint,TextData)Values("&Request.Form("hExamID")&",'"&Request.Form("hExamName")&"','"&Request.Form("hUserID")&"'"&_","&Split(Request.Form("A"),",")(0)&","&Split(Request.Form("B"),",")(0)&","&Split(Request.Form("C"),",")(0)&","&Split(Request.Form("D"),",")(0)&","&Split(Request.Form("E"),",")(0)&","&Split(Request.Form("F"),",")(0)&_","&ClassID&","&RID&",'"&RLX&"',"&RFS&",'"&RWDNR&"')"'response.writerssql&"<hr>"Conn.Execute(rsSql)EndSubCloseRS()SubCloseRS()OnErrorResumeNextifIsObject(rs)thenrs.Close()setrs=NothingendifCloseDatabase()EndSub%>
回答：你说的63行应该是以下吧：rsSql="Insert Into ExamData(ExamID,ExamName,Examinee,DeptID,[LevelID],ServiceTime,Sex,Age,Education,"&_ "CatalogID,RubricID,RubricType,RubricPoint,TextData) Values("&Request.Form("hExamID")&",'"&Request.Form("hExamName")&"','"&Request.Form("hUserID")&"'"&_ ","&Split(Request.Form("A"),",")(0)&","&Split(Request.Form("B"),",")(0)&","&Split(Request.Form("C"),",")(0)&","&Split(Request.Form("D"),",")(0)&","&Split(Request.Form("E"),",")(0)&","&Split(Request.Form("F"),",")(0)&_ ","&ClassID&","&RID&",'"&RLX&"',"&RFS&",'"&RWDNR&"')"检查看看你的split分解的字符串，是否都能成功，即是否都可分解出来，你可以分别将分解前的变量打印出来看看先