因为你没有嵌套使用,试试看下面这样
<%
Dim zsql,csql,zRs,cRs
If ChannelID=113 Then
csql ="Select ClassID,ID,FolderName,TS,TN,TJ from KS_Class where TN='20119065171248'"
Set cRs = Conn.Execute(csql)
Do While not cRs.eof
response.write "
第二个do while 就没有执行。是因为你把
zsql ="Select KS_Fname,ID,KS_CID from KS_Form_zcfile where ID=" & cRS("ID") & "order by KS_CID"
Set zRs = Conn.Execute(zsql)
放错了。
放在 response.write zRs("KS_Fname")前面