ASP SQL查询怎么返回字符串
select a,b,c,d from t_store 比喻有5条数据 ,strReturnValue 怎么返回5组数据或者 在加分隔符,全部的数据返回字符串、。
rs.open strSql,conn,0
while not rs.eof and not rs.bof
strReturnValue = trim(rs("a")) & "|" & trim(rs("b") ) & "|" & rs("c")
这样写只能返回1条数据 storecode|shortstorenm|storeid ,我要返回5条怎么写?
rs.movenext
wend
rs.close
set rs = nothing
js页面传递 返回字符串。请怎么写?谢谢
------解决方案--------------------
ORZ
strReturnValue =split(strReturnValue ,"|")
for i=0 to ubound(strReturnValue )
response.write strReturnValue (i)
next
------解决方案--------------------
VBScript code
test = ""
for i = 1 to 5
test = test & "1|2|3,"
next
test = mid(test, 1, len(test)-1)
response.write test