ASP VB代码求助

来源:百度知道 编辑:UC知道 时间:2024/05/12 07:20:19
<!--#include file="ConnStrings.asp"-->
<%
Dim Rs1,Rs2,Rs3,Rs4
Dim SchoolName,GP1,GP2,GP3
ConnOpen
Set MyCmd = Server.CreateObject("ADODB.Command")
MyCmd.ActiveConnection = MyConn
MyCmd.CommandText = "SELECT UserName FROM FT_User WHERE depname=学院"
Set Rs1 = MyCmd.Execute
While not rs1.eof
SchoolName = Rs1("UserName")
Response.write SchoolName&"  "

GP1 = 0
MyCmd.CommandText = "SELECT * FROM News WHERE (checked=1) AND (editor="&SchoolName&") AND (typeid=20)"
Set Rs2 = MyCmd.Execute
While not rs2.eof
GP1 = GP1 + 1
rs2.movenext
Wend
Response.write "基层信息"&GP1&"  "
Rs2.close
set Rs2=nothing

GP2 = 0
MyCmd.CommandText = "SELECT * FROM News WHERE (checked=1) AND (editor="&SchoolName&") AND (goodnews=1)"
Set Rs3 = MyCmd.Execute

打开IE--工具--internet 选项--高级--显示友好的HTTP错误,去掉勾勾,就可以看见程序的具体错误了

能不能把错误信息说明白点,整段错误信息拷贝过来吧