好心人,帮忙改一下这个语句,没心思改了,出了这么多事儿
if cname <> " " then
if isno = "1 " then
cname = " ' " & cname & " ' "
elseif isno = "2 " then
'----------------------就这一段
dim sql2,rs2
sql2= "select gsid from duizhaobiao where zyid= "&cname& " "
rs2.open sql2,conn,3,1
'cname=conn.execute(sql2).getstring (,,, ", ")
do while not rs2.eof
cname=rs( "gsid ")& ", "
loop
response.write cname
end if
'---------------------就这一段
else
if range = "0 " or range = " " then
cname = "default "
else
cname = " ' " & range & " ' "
end if
end if
标示出的这一段不知道怎么合适了,基础差,并且最近很烦,好心人帮改一下
------解决方案--------------------dim sql2,rs2
sql2= "select gsid,zyid from duizhaobiao where zyid= "&cname& " "
rs2.open sql2,conn,1
do while not rs2.eof and not rs2.bof
cname=rs( "gsid ")& ", "
response.write cname
rs2.movenext
loop
------解决方案--------------------cname=rs( "gsid ")& ", "
改成
cname=rs2( "gsid ")& ", "
------解决方案--------------------先确定cname有没有值,
还有
cname = " ' " & cname & " ' "这个不明白你要什么,如果这里没取到值,下面的执行的肯定会 空。所以,把你的cname要取得的值贴出来
改为:cname=request( "cname ")
------解决方案--------------------dim sql2,rs2
sql2= "select gsid,zyid from duizhaobiao where zyid= "&cname& " "
rs2.open sql2,conn,1
do while not rs2.eof and not rs2.bof
cname=rs2( "gsid ")& ", "
response.write cname
rs2.movenext
loop
------解决方案--------------------没有创建记录集对象
Set rs2 = Server.CreateObject( "Adodb.Recordset ")