希望给出完整的代码,用asp写。。分别取得“|”号左边和右边的数据(我只需要用recordset得到结果,不需要插入投票数据)
我在数据库区问了但那位老大只给出vba下的方法:http://community.csdn.net/Expert/TopicView3.asp?id=5434402,我仍然不会,需要有asp写的代码。。
2 个解决方案
#1
<%
dim votenum, arrVotenum
votenum = rs("votenum")
if votenum <> "" then
dim i
arrVotenum = split(votenum, "|")
for i = 0 to ubound(arrVotenum)
response.write "第" & (i + 1) & "票得票数; " & trim(arrVotenum(i)) & "<br />"
next
end if
%>
dim votenum, arrVotenum
votenum = rs("votenum")
if votenum <> "" then
dim i
arrVotenum = split(votenum, "|")
for i = 0 to ubound(arrVotenum)
response.write "第" & (i + 1) & "票得票数; " & trim(arrVotenum(i)) & "<br />"
next
end if
%>
#2
谢谢,OK了!我马上结贴!
#1
<%
dim votenum, arrVotenum
votenum = rs("votenum")
if votenum <> "" then
dim i
arrVotenum = split(votenum, "|")
for i = 0 to ubound(arrVotenum)
response.write "第" & (i + 1) & "票得票数; " & trim(arrVotenum(i)) & "<br />"
next
end if
%>
dim votenum, arrVotenum
votenum = rs("votenum")
if votenum <> "" then
dim i
arrVotenum = split(votenum, "|")
for i = 0 to ubound(arrVotenum)
response.write "第" & (i + 1) & "票得票数; " & trim(arrVotenum(i)) & "<br />"
next
end if
%>
#2
谢谢,OK了!我马上结贴!