请高手帮忙注释这段程序解决方法
请高手帮忙注释这段程序
<!--#include file="dataconn.asp"-->
<%
xh=trim(request.querystring("xh"))
stuname=trim(request.querystring("stuname"))
team=trim(request.querystring("team"))
set rs=conn.execute("select cxsetup from cominfo")
cxsetup=rs("cxsetup").value
rs.close
set rs=nothing
if team="all" then
sql="select * from studentpmb where stuidh='"&xh&"' and stuname='"&stuname&"'"
team="当前时段所有项目"
else
sql="select * from studentpmb where stuidh='"&xh&"' and stuname='"&stuname&"' and ksname='"&team&"'"
end if
on error resume next
set rs=conn.execute(sql)
if err then
response.write "对不起,还没有该次工资!"
response.end
end if
totalput=rs.RecordCount
if rs.eOF then
Response.Write escape("<font color=#ff0000>对不起,没有查询到该记录,请检查你输入的密码、姓名和查询项目是否对应!</font>")
response.end
end if
------解决方案--------------------
<!--#include file="dataconn.asp"-->
<%
xh=trim(request.querystring("xh")) '获取表单传过来的XH的值,trim去掉空字符串
stuname=trim(request.querystring("stuname"))
team=trim(request.querystring("team"))
set rs=conn.execute("select cxsetup from cominfo")'调用execute方法查询记录,不过我记得ASP在查询时一般也用OPEN的
cxsetup=rs("cxsetup").value '把查出cxsetup的值取出来
rs.close '关闭记录集
set rs=nothing '销毁rs对象
if team="all" then
sql="select * from studentpmb where stuidh='"&xh&"' and stuname='"&stuname&"'"
team="当前时段所有项目"
else
sql="select * from studentpmb where stuidh='"&xh&"' and stuname='"&stuname&"' and ksname='"&team&"'"
end if '这里根据不同的条件筛选不同的记录
on error resume next
set rs=conn.execute(sql)
if err then
response.write "对不起,还没有该次工资!" '在浏览器输出此语句
response.end '程序结束执行
end if
totalput=rs.RecordCount '取总记录数量
if rs.eOF then '如果到达记录尾则表示没有记录
Response.Write escape("<font color=#ff0000>对不起,没有查询到该记录,请检查你输入的密码、姓名和查询项目是否对应!</font>")
response.end
end if
解释ASP?不知道能否满足你要求
------解决方案--------------------
<!--#include file="dataconn.asp"-->
<%
xh=trim(request.querystring("xh"))
stuname=trim(request.querystring("stuname"))
team=trim(request.querystring("team"))
set rs=conn.execute("select cxsetup from cominfo")
cxsetup=rs("cxsetup").value
rs.close
set rs=nothing
if team="all" then
sql="select * from studentpmb where stuidh='"&xh&"' and stuname='"&stuname&"'"
team="当前时段所有项目"
else
sql="select * from studentpmb where stuidh='"&xh&"' and stuname='"&stuname&"' and ksname='"&team&"'"
end if
on error resume next
set rs=conn.execute(sql)
if err then
response.write "对不起,还没有该次工资!"
response.end
end if
totalput=rs.RecordCount
if rs.eOF then
Response.Write escape("<font color=#ff0000>对不起,没有查询到该记录,请检查你输入的密码、姓名和查询项目是否对应!</font>")
response.end
end if
------解决方案--------------------
<!--#include file="dataconn.asp"-->
<%
xh=trim(request.querystring("xh")) '获取表单传过来的XH的值,trim去掉空字符串
stuname=trim(request.querystring("stuname"))
team=trim(request.querystring("team"))
set rs=conn.execute("select cxsetup from cominfo")'调用execute方法查询记录,不过我记得ASP在查询时一般也用OPEN的
cxsetup=rs("cxsetup").value '把查出cxsetup的值取出来
rs.close '关闭记录集
set rs=nothing '销毁rs对象
if team="all" then
sql="select * from studentpmb where stuidh='"&xh&"' and stuname='"&stuname&"'"
team="当前时段所有项目"
else
sql="select * from studentpmb where stuidh='"&xh&"' and stuname='"&stuname&"' and ksname='"&team&"'"
end if '这里根据不同的条件筛选不同的记录
on error resume next
set rs=conn.execute(sql)
if err then
response.write "对不起,还没有该次工资!" '在浏览器输出此语句
response.end '程序结束执行
end if
totalput=rs.RecordCount '取总记录数量
if rs.eOF then '如果到达记录尾则表示没有记录
Response.Write escape("<font color=#ff0000>对不起,没有查询到该记录,请检查你输入的密码、姓名和查询项目是否对应!</font>")
response.end
end if
解释ASP?不知道能否满足你要求
------解决方案--------------------
- VBScript code
<!--#include file="dataconn.asp"--> <% xh=trim(request.querystring("xh")) '获取表单传过来的XH的值,trim去掉空字符串 stuname=trim(request.querystring("stuname")) team=trim(request.querystring("team")) set rs=conn.execute("select cxsetup from cominfo")'调用execute方法查询记录,不过我记得ASP在查询时一般也用OPEN的 cxsetup=rs("cxsetup").value '把查出cxsetup的值取出来 rs.close '关闭记录集 set rs=nothing '销毁rs对象 if team="all" then sql="select * from studentpmb where stuidh='"&xh&"' and stuname='"&stuname&"'" team="当前时段所有项目" else sql="select * from studentpmb where stuidh='"&xh&"' and stuname='"&stuname&"' and ksname='"&team&"'" end if '这里根据不同的条件筛选不同的记录 on error resume next set rs=conn.execute(sql) if err then response.write "对不起,还没有该次工资!" '在浏览器输出此语句 response.end '程序结束执行 end if totalput=rs.RecordCount '取总记录数量 if rs.eOF then '如果到达记录尾则表示没有记录 Response.Write escape("<font color=#ff0000>对不起,没有查询到该记录,请检查你输入的密码、姓名和查询项目是否对应!</font>") response.end end if
------解决方案--------------------
这是设置HTML文字颜色font color=#ff0000
------解决方案--------------------