asp 成绩管理查询系统 查询数据库 是否存在

来源:百度知道 编辑:UC知道 时间:2024/07/05 16:45:31
弄了一个简单的asp+access学生成绩管理系统, 可在添加成绩的时候,随便写一个学生的名字以及成绩之类的就能添加了,不用查询数据库中是否存在该学生、、我是菜鸟、 该怎么解决、、为避免分数浪费,我先给30分,好心帮忙的高手我会给加分的

以下是代码,不知道给的对不对。。。如果有愿意直接跟我交流的高手,不甚感激。。
<table width="768" height="25" align="center" cellpadding="0" cellspacing="0" class="unnamed_rld2">
<%if request.querystring("kind")="new" then%>
<tr>
<td align="center"><br><form name="form1" action="admin_adddata.asp?type=news" method="post">
<table width="50%" border="1" cellspacing="0" cellpadding="0" bordercolor="#eeeeee">
<tr align="center">
<td height="31" colspan="2">添加单个学生的成绩</td>
</tr>
<tr>
<td width="27%" align="center">班级</td>
<td w

你好,修正了一下相关部分的代码,经测试,已达到你的要求,具体代码如下:

<%if session("password")<>"" then%>
<!--#include file="inc/conn.asp"-->

<%
if request.querystring("type")="news" then

dim i,j
num=request.form("number")
max=request.form("max")

for j=1 to num

for i=1 to max

if request("bj"&j&i)="--==请选择==--" then
response.write "<script language=JavaScript>" & chr(13) & "alert('请选择该学生所在班级');" & "history.back()" & "</script>"
Response.End
end if
if request("xh"&j&i)="" then
response.write "<script language=JavaScript>" & chr(13) & "alert('学号栏要全部填');" & "history.back()" & "</script>"
Response.End
end if

bj=Replace(Request.