asp中sql case的用法请教!急!
我下载了一个考试的代码,其中这段老是报错:类型不匹配。哪位高手帮忙解决下!!!!!!<%selectcasers("SUBJECT_TYPE"):case1:Proble...
我下载了一个考试的代码,其中这段老是报错:类型不匹配。哪位高手帮忙解决下!!!!!!
<%
select case rs("SUBJECT_TYPE"):
case 1:
ProblemType="Radio"
for n=1 to 4
%>
<input type="<%=ProblemType%>" name="No<%=rs("SUBJECT_ID")%>" value="<%=n%>"> <%=rs("CHOOSE"&n)%><br>
<% next
case 2:
ProblemType="Checkbox"
for n=1 to 4%>
<input type="<%=ProblemType%>" name="No<%=rs("SUBJECT_ID")%>-<%=n%>" value="<%=n%>"> <%=rs("CHOOSE"&n)%><br>
<%next
case 3:
%><input type="text" name="<%=rs("CHOOSE1")%>"><br><%
end select
%> 展开
<%
select case rs("SUBJECT_TYPE"):
case 1:
ProblemType="Radio"
for n=1 to 4
%>
<input type="<%=ProblemType%>" name="No<%=rs("SUBJECT_ID")%>" value="<%=n%>"> <%=rs("CHOOSE"&n)%><br>
<% next
case 2:
ProblemType="Checkbox"
for n=1 to 4%>
<input type="<%=ProblemType%>" name="No<%=rs("SUBJECT_ID")%>-<%=n%>" value="<%=n%>"> <%=rs("CHOOSE"&n)%><br>
<%next
case 3:
%><input type="text" name="<%=rs("CHOOSE1")%>"><br><%
end select
%> 展开
1个回答
展开全部
<%
select case cstr(rs("SUBJECT_TYPE"))
case "1"
ProblemType="Radio"
for n=1 to 4
%>
<input type="<%=ProblemType%>" name="No<%=rs("SUBJECT_ID")%>" value="<%=n%>"> <%=rs("CHOOSE"&n)%><br>
<% next
case "2"
ProblemType="Checkbox"
for n=1 to 4%>
<input type="<%=ProblemType%>" name="No<%=rs("SUBJECT_ID")%>-<%=n%>" value="<%=n%>"> <%=rs("CHOOSE"&n)%><br>
<%next
case "3"
%><input type="text" name="<%=rs("CHOOSE1")%>"><br><%
end select
%>
select case cstr(rs("SUBJECT_TYPE"))
case "1"
ProblemType="Radio"
for n=1 to 4
%>
<input type="<%=ProblemType%>" name="No<%=rs("SUBJECT_ID")%>" value="<%=n%>"> <%=rs("CHOOSE"&n)%><br>
<% next
case "2"
ProblemType="Checkbox"
for n=1 to 4%>
<input type="<%=ProblemType%>" name="No<%=rs("SUBJECT_ID")%>-<%=n%>" value="<%=n%>"> <%=rs("CHOOSE"&n)%><br>
<%next
case "3"
%><input type="text" name="<%=rs("CHOOSE1")%>"><br><%
end select
%>
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询