高手进来帮一下忙,急,解决就送分
sub cf(str)
str=split(str, ", ")
Select Case trim(str(i))
for i = 0 to ubound(str)
Case trim(str(i))
sql= "select * from view_Attribute_ClassGoods where Class_Value_Attributeid= "&trim(str(i))& " "
Set rs= Server.CreateObject( "ADODB.Recordset ")
rs.open sql,conn,1,1
Response.Write( "return new Array( ")
do while not rs.eof
ValueName=ValueName & ", ' "&rs( "Class_Value_Name ")& " ' "
rs.movenext
loop
rs.close
Response.Write( "); ")
next
end select
end sub
注明一下,str= '1 ', '2 ', '3 '
报错如下
缺少语句
/admin2007/Admin_Product/Add_Product.asp,行 228
Case trim(str(i))
------解决方案--------------------sub cf(str)
str=split(str, ", ")
Select Case str_test
for i = 0 to ubound(str)
str_test=trim(str(i))
Case str_test
sql= "select * from view_Attribute_ClassGoods where Class_Value_Attributeid= "&trim(str(i))& " "
Set rs= Server.CreateObject( "ADODB.Recordset ")
rs.open sql,conn,1,1
Response.Write( "return new Array( ")
do while not rs.eof
ValueName=ValueName & ", ' "&rs( "Class_Value_Name ")& " ' "
rs.movenext
loop
rs.close
Response.Write( "); ")
next
end select
end sub
看看
------解决方案--------------------Case cint(trim(str(i)))