各位有没有开发过asp成绩查询系统?

qiujianben 2001-08-18 12:18:38
最好有密码验证的,能自动发送密码到邮箱
还可以分类查找的。我做了一个初版,没有什么功能,但是
能用。开发完后,我会放到网上去的,提供免费下载
...全文
86 点赞 收藏 9
写回复
9 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
alei 2001-08-20
自己做呗
又不难
回复
qiujianben 2001-08-20
我会参考
回复
moskies 2001-08-19
做过!支持多条件模糊查询!很简单的!!!自己做就可以了!!!
回复
sundna 2001-08-19
这种东西简单呀, 多用些心去做吧, 要做就要做好!
回复
lci21 2001-08-19
问题可以结了吗?
回复
qiujianben 2001-08-19
好啊!能不能发给我一份,我看看?qiujianben@yeah.net
回复
qiujianben 2001-08-19
谢谢
回复
lci21 2001-08-19
用两个页面来实现,第一个页面获得查询条件,并保存到session中,当然你可以个整个sql语句保存到session中,在第二个页面,也就是分页的那个页面,从session中取出sql语句,再查询,条件就不会丢了。呵呵!

给你一段获取条件的代码参考参考吧:
<%else
Function adjust_sql(adj_str)
Dim final_str, i
adj_str = Trim(adj_str)
final_str = ""
If Len(adj_str) > 0 Then
For i = 1 To Len(adj_str)
Select Case Mid(adj_str, i, 1)
Case "[":
final_str = final_str & "[[]"
Case "¦":
final_str = final_str & "[{-}]"
Case "'":
final_str = final_str & "[&-(]"
Case Else:
final_str = final_str & Mid(adj_str, i, 1)
End Select
Next
End If
adjust_sql = final_str
End Function

'定义查询条件变量,暂缺日期查询变量
Dim d_ghscjbm,d_ghscjmc,d_cdbm,d_wz,d_bmqsrq,d_bmzzrq
'指定条件数目、通用符号、SQL字符串
Dim cond_count, wc, sql
'记录指定条件的总数目
cond_count = 6
'指定SQL指令中的通用符号,sybase里面用的符号是百分比(%)
wc = "%"
'取得表单栏位内容
d_ghscjbm = Request("ghscj_bm")
d_ghscjmc = Request("ghscj_mc")
d_cdbm = Request("ghscj_cdbm")
d_wz = Request("ghscj_wz")
d_bmqsrq=Request("ghscj_bmqsrq")
d_bmzzrq=Request("ghscj_bmzzrq")

'调整SQL指令中的特定符号
d_ghscjbm = adjust_sql(d_ghscjbm)
d_ghscjmc = adjust_sql(d_ghscjmc)
d_cdbm = adjust_sql(d_cdbm)
d_wz = adjust_sql(d_wz)
d_bmqsrq=adjust_sql(d_bmqsrq)
d_bmzzrq=adjust_sql(d_bmzzrq)

If Len(d_ghscjbm) = 0 Then cond_count = cond_count - 1
If Len(d_ghscjmc) = 0 Then cond_count = cond_count - 1
If Len(d_cdbm) = 0 Then cond_count = cond_count - 1
If Len(d_wz) = 0 Then cond_count = cond_count - 1
If Len(d_bmqsrq) = 0 Then cond_count = cond_count -1
If Len(d_bmzzrq) = 0 Then cond_count = cond_count -1
'判断查询条件是否为空
If (Len(Trim(d_ghscjbm)) = 0) And _
(Len(Trim(d_ghscjmc)) = 0) And _
(Len(Trim(d_cdbm)) = 0) And _
(Len(Trim(d_wz)) = 0) And _
(Len(Trim(d_bmqsrq)) = 0) And _
(Len(Trim(d_bmzzrq)) = 0) Then

sql = "select * from pub_ghscjbm "
'sql1="select count(d_ghscjbm) as aa from pub_ghscjbm "
sql1="select "&"'"&"aa"&"'"&"=count(d_ghscjbm) from pub_ghscjbm "
Else
sql = "select * from pub_ghscjbm where "
'sql1="select count(*) from pub_ghscjbm where "
sql1="select "&"'"&"aa"&"'"&"=count(d_ghscjbm) from pub_ghscjbm where "

End if
If Len(d_ghscjbm) > 0 Then

sql = sql & " d_ghscjbm like '" & wc & d_ghscjbm & wc & "'"
sql1 = sql1 & " d_ghscjbm like '" & wc & d_ghscjbm & wc & "'"

If cond_count > 1 Then
sql = sql & " and "
sql1 = sql1 & " and "
cond_count = cond_count - 1
End If
End If

If Len(d_ghscjmc) > 0 Then
sql = sql & " d_ghscjmc like '" & wc & d_ghscjmc & wc & "'"
sql1 = sql1 & " d_ghscjmc like '" & wc & d_ghscjmc & wc & "'"

If cond_count > 1 Then
sql = sql & " and "
sql1 = sql1 & " and "
cond_count = cond_count - 1
End If
End If

If Len(d_cdbm) > 0 Then
sql = sql & " d_cdbm like '" & wc & d_cdbm & wc & "'"
sql1 = sql1 & " d_cdbm like '" & wc & d_cdbm & wc & "'"

If cond_count > 1 Then
sql = sql & " and "
sql1 = sql1 & " and "
cond_count = cond_count - 1
End If
End If

If Len(d_wz) > 0 Then
sql = sql & " d_wz like '" & wc & d_wz & wc & "'"
sql1 = sql1 & " d_wz like '" & wc & d_wz & wc & "'"

If cond_count > 1 Then
sql = sql & " and "
sql1 = sql1 & " and "
cond_count = cond_count - 1
End If
End If
If Len(d_bmqsrq) > 0 Then
sql = sql & " d_bmrq >= '" & d_bmqsrq & "'"
sql1 = sql1 & " d_bmrq >= '" & d_bmqsrq & "'"

If cond_count > 1 Then
sql = sql & " and "
sql1 = sql1 & " and "
cond_count = cond_count - 1
End If
End If
If Len(d_bmzzrq) > 0 Then
sql = sql & " d_bmrq <= '" & d_bmzzrq & "'"
sql1 = sql1 & " d_bmrq <= '" & d_bmzzrq & "'"
End If
sql = sql & " order by d_ghscjbm"
sql1 = sql1 & " order by d_ghscjbm"
'Response.Write sql
'Response.Write "<br>"&sql1
'Response.end
set count = conn.execute(sql1)
session("QUERY_TEXT1") = sql
counter=count.Fields(0)
count.close
set count=nothing
conn.close
set conn=nothing
Response.Redirect("ghscjcx1.asp?count="&counter)

End If
conn.close
set conn=nothing
%>
回复
lci21 2001-08-18
我做过,你是谁啊?为谁做的?我做的包括页面级密码校验,支持多条件查询等等
回复
发帖
ASP
创建于2007-09-28

2.8w+

社区成员

ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
申请成为版主
帖子事件
创建了帖子
2001-08-18 12:18
社区公告
暂无公告