xuluo7742 发表于 2007-5-21 18:26
经验不够看不了
kjkjk 发表于 2007-5-23 03:21
asp制作学生档案管理系统
作者:陈庆平 安徽新华电脑学校
摘要:本系统是根据现代化校园的发展而设计的基于asp的学生档案管理系统,本系统可以方便老师、家长来学校查找学生。实现全校学生信息在线查询。还可以对新来的学员信息进行信息录入。由于学员上课情况复杂,可以实现信息修改,及时调整学员的基本情况。
关键字 asp 在线查询 信息录入 信息修改
一、制作数据库和建立数据源
1、利用microsoft access 制作数据库,取名为information,然后制作表,表名为infor.下面写入数据字段。如图所示:
2、建立odbc数据源(在2000 professional 系统中建立)
步骤:
控制面板0管理工具0odbc数据源0系统dsn0add….
odbc界面
二、系统界面
一个好的系统需要一个友好的用户界面。由于本系统是基于asp开发的,所以,我们利用网页制作工具制作友好的用户界面。部分界面如图所示:
进入界面
信息录入界面
信 息 查 询
三、程序实现
由于本系统是基于asp开发的实现在线操作的系统。所以,本系统的完成需要借助html,又由于html是网页编程的基础,所以,在这里就省去html代码,相信大家都是html高手。
1、信息录入
<%
dim strsql,rs
set conn=createobject("adodb.connection") //建立adodb连接
conn.open ("dsn=information;uid=;pwd=;") //打开数据源information
set rs=createobject("adodb.recordset") //建立记录对象rs
rs.open "infor",conn,3,3 //打开数据库里的infor表
rs.addnew //添加一条新的记录
rs("name").value=request.form("name") /*取得表单名为 name里的内容“送”
到数据库name记录里(备注:表单名是信息录入界面里的提示信息是“姓名”的表单域的名字,以下类似)*/
rs("sex").value=request.form("sex")
rs("birth").value=request.form("birthday")
rs("zzmm").value=request.form("zz")
rs("teach").value=request.form("teach")
rs("xl").value=request.form("xl")
rs("class").value=request.form("class")
rs("school").value=request.form("school")
rs("add").value=request.form("add")
rs("tel").value=request.form("tel")
rs("hy").value=request.form("mar")
rs("jg").value=request.form("addr")
rs("career").value=request.form("career")
rs("date").value=request.form("time")
rs("school").value=request.form("school")
rs.update //保存数据库里的记录
response.write ("你已经成功注册的这位学员的信息。请继续<a href=“input.htm“>注册 </a>") //显示提示信息
rs.close //关闭数据记录
conn.close //关闭连接
set rs=nothing
set conn=nothing
%>
2、信息查询
<%
dim strsql,conn,rs
set conn=server.createobject("adodb.connection")
conn.open ("dsn=information;uid=;pwd=;")
set rs=server.createobject("adodb.recordset")
strsql="select * from infor where
name= “" & request("name") &"“"//利用sql建立查询
rs.open strsql,conn
%>
<table width="1205" border="1" align="left" bordercolor="#6600cc">
<tr> //本行写上要显示的字段的相应的中文名
<td width="69"><div align="center">
<font size="2">姓名</font></div></td>
<td width="46"><div align="center">
<font size="2">性别</font></div></td>
<td width="122"><div align="center">
<font size="2">出生年</font></div></td>
<td width="46"><div align="center">
<font size="2">学历</font></div></td>
<td width="91"><div align="center">
<font size="2">政治面貌</font></div></td>
<td width="91"><div align="center">
<font size="2">专业</font></div></td>
<td width="50"><div align="center">
<font size="2">班级</font></div></td>
<td width="69"><div align="center">
<font size="2">班主任</font></div></td>
<td width="122"><div align="center">
<font size="2">入学时间</font></div></td>
<td width="146"><div align="center">
<font size="2">联系电话</font></div></td>
<td width="337"><div align="center">
<font size="2">联系地址</font></div></td>
</tr>
<% while not rs.eof %> //循环语句控制符合条件的记录输出
<tr> //本行根据循环条件可以重复输出
<td><div align="center"><font size="2">
<%=rs("name")%></font></div></td>
/*输出数据库中符合条件的name字段的值*/
<td><div align="center"><font size="2">
<%=rs("sex")%></font></div></td>
<td><div align="center"><font size="2">
<%=rs("birth")%></font></div></td>
<td><div align="center"><font size="2">
<%=rs("xl")%></font></div></td>
<td><div align="center"><font size="2">
<%=rs("zzmm")%></font></div></td>
<td><div align="center"><font size="2">
<%=rs("career")%></font></div></td>
<td><div align="center"><font size="2">
<%=rs("class")%></font></div></td>
<td><div align="center"><font size="2"><%=rs("teach")%></font></div></td>
<td><div align="center"><font size="2"><%=rs("date")%></font></div></td>
<td><div align="center"><font size="2"><%=rs("tel")%></font></div></td>
<td><div align="center"><font size="2"><%=rs("add")%></font></div></td></tr>
<% rs.movenext
wend
rs.close
conn.close
%>
</table>
3、信息修改
<%
set conn=server.createobject("adodb.connection")
conn.open "dsn=information;uid=;pwd=;"
set rs=server.createobject("adodb.recordset")
username=request("name") // 取得name表单的值赋给username
strsql="select * from infor where name=“"&username&"“" //建立sql查询
rs.open strsql,conn,3,3
%>
<form action="zhuce.asp" method="post">
// 以post方式将修改的记录通过zhuce.asp页面的程序保存到数据库当中
<table width="75%" border="1" align="center" bordercolor="#663399">
<tr>
<td width="18%"><div align="right"><font size="2">姓 名:</font></div></td>
<td width="36%"><font size="2">
<input name="name" type="text" id="name" value="<%=rs.fields("name")%>">
</font></td> //显示符合查询条件的数据库当中name字段的值,供修改
<td width="15%"><div align="right"><font size="2">入学时间:</font></div></td>
<td width="31%"><input name="time" type="text" id="time" value="<%=rs.fields("date")%>"></td>
</tr>
<tr>
<td height="20"><div align="right"><font size="2">性 别:</font></div></td>
<td><p>
<label>
<input name="sex" type="radio" value="<%=rs.fields("sex")%>" checked>
男</label>
<label>
<input type="radio" name="sex" value="<%=rs.fields("sex")%>">
女</label>
</p></td>
<td><div align="right"><font size="2">专业:</font></div></td>
<td><input name="career" type="text" id="career" value="<%=rs.fields("career")%>"></td>
</tr>
<tr>
<td><div align="right"><font size="2">出生年月:</font></div></td>
<td><font size="2">
<input name="birthday" type="text" id="birthday" value="<%=rs.fields("birth")%>">
</font></td>
<td><div align="right"><font size="2">班级:</font></div></td>
<td><input name="class" type="text" id="class" value="<%=rs.fields("class")%>"></td>
</tr>
<tr>
<td><div align="right"><font size="2">政治面貌:</font></div></td>
<td><select name="zz" id="zz">
<option value="团员">团员</option>
<option value="党员">党员</option>
<option value="其他">其他</option>
</select></td>
<td><div align="right"><font size="2">班主任:</font></div></td>
<td><input name="teach" type="text" id="teach" value="<%=rs.fields("teach")%>"></td>
</tr>
<tr>
<td><div align="right"><font size="2">学历:</font></div></td>
<td><font size="2">
<select name="xl" id="xl">
<option value="初中">初中</option>
<option value="高中">高中</option>
<option value="大专">大专</option>
<option value="本科">本科</option>
<option value="研究生">研究生</option>
<option value="其他">其他</option>
</select>
</font></td>
<td><div align="right"><font size="2">教室:</font></div></td>
<td><input name="room" type="text" id="room"></td>
</tr>
<tr>
<td><div align="right"><font size="2">原毕业学校:</font></div></td>
<td><font size="2">
<input name="school" type="text" id="school" value="<%=rs.fields("school")%>">
</font></td>
<td colspan="2" rowspan="5"><div align="left">
<p><font color="#ff0000" size="2">请数据录入人员认真录入学员信息,以便以</font></p>
<p><font color="#ff0000" size="2">后查询!</font></p>
</div></td>
</tr>
<tr>
<td><div align="right"><font size="2">联系地址:</font></div></td>
<td><font size="2">
<input name="add" type="text" id="add" value="<%=rs.fields("add")%>">
</font></td>
</tr>
<tr>
<td><div align="right"><font size="2">联系电话:</font></div></td>
<td><font size="2">
<input name="tel" type="text" id="tel"
value="<%=rs.fields("tel")%>">
</font></td>
</tr>
<tr>
<td><div align="right"><font size="2">婚姻状况:</font></div></td>
<td><select name="mar" id="mar">
<option value="已婚">已婚</option>
<option value="未婚">未婚</option>
</select></td>
</tr>
<tr>
<td><div align="right"><font size="2">籍贯:
</font></div></td>
<td><font size="2">
<input name="addr" type="text" id="addr"
value="<%=rs.fields("jg")%>">
</font></td>
</tr>
</table>
<table width="75%" border="0">
<tr>
<td><div align="center">
<input type="submit" name="submit2" value="保 存">
</div></td>
<td><input type="reset" name="reset" value="重 写"></td>
</tr>
</table>
<p> </p>
</form>
niguding 发表于 2007-5-25 13:48
我经验够吧。。貌似。。权限还不满足。。这是什么原因额。。
niguding 发表于 2007-5-25 13:51
为什么还看不到哦。。郁闷ing
sonny103 发表于 2007-5-25 15:42
好东西 一定要下
cflsky 发表于 2007-5-25 15:49
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
sonny103 发表于 2007-5-25 16:02
◆...................o888888o.o88888888o.
.................8888888888888888888888888o.
...............888::::888888888888888888888888o.
.............88::::::::88888888888888888888888888o.
...........o8:::::::::888::顶88888888888888888888888.
..........8888:8::::::8:::::::::顶888888888888888888888.
.........8888::::8888::::::::::::::::顶88888888888 '88
........8888:::888888888::::::::::::::::顶888888888 8
.......88.88888888888888888:::::::::::::顶88888888888
......88..888888888888888888:::::::::::顶88888888888888
......88.888888888888888888888::::::::顶88888888888888888
......8..8888888888888888888888::::::顶88888888888888888888
........8888888888888888::88888:::::顶8888888888888888888888
......88888888888888888::::8888::::顶8888888888888888 '8888
.....88888888888888888::::8888::::顶:8::***::888888888 888
....88888888888888888::::888:::::顶::::*eye*::888888888 88
..888888888888888888::::88::::::顶::::::::::::::::::888888888 88
.8888888888888888888::::8::::::顶:::::::::::::::::::顶888888888 88
888...8888888888::::88::::8:::::顶:::8oo8::::::::::88888888888888 8
88...88888888888:::::8:::::::::顶::::::::::::::::::::::88888888888888888
.8..8888888888888::::::::::::顶::"8888888"::::::顶88888888888888888
..8888888888::888:::::::::::顶:::::"8a8"::::::::::顶88888888888888888888
.888888888:::::88::::::::::顶88::::::::::::::::::::顶88888888888888888888888
8888888888:::::8:::::::::顶88888::::::::::::::顶88888888888888888888888888
888888888:::::8:::::::::顶8888888ooooo顶88888888888888888888888888888
888888.顶::::::::::::::顶8888888888::::::顶8888888888888888 '888888888
8888..顶:::::::::::::::顶88888888888::::::顶8888888888888888 88888888
.888..顶::::::::::::::顶8888888888888:::::::顶888888888888888 888888
..888.顶:::::::::::::顶88888888888888888::::::顶8888888888888 88888
...88.顶:::::::::::::8888:88888888888888888:::::顶顶888888888 8888
...88.顶:::::::::::8888顶::88888::888888888888:::::顶顶88888 888
...8...顶::::::::::8888顶:::8888:::::88888888888:::::::顶顶88 888
.......8顶:::::::8888顶:::::888:::::::::88:::8888888:::::::::顶顶 88
......88顶:::::::8888顶::::::88:::::::::::8:::::888888::::::::::::顶顶 88
.....8888顶:::::888顶:::::::::88:::::::::::::顶::::8888::::::::::::::顶 8
....88888:顶::::888顶::::::::::8:::::::::::::::顶::::888:::::::::::::::::顶
...88.888:顶:::888:顶::::::::::8:::::::::::::::::顶::888::::::::::::::::::::顶
...8.88888顶:::88::顶::::::::::::::::::::::::::::::顶:88::::::::::::::::::::::::顶
.....88888顶:::88::顶:::::::::::::::::::::::::::::::::顶88:::::::::::::::::::::::::顶
.....88888顶:::88::顶:::::::::::::::::::::::::::::::::顶:8::::::::::::::::::::::::::::顶
....888888顶::::8::顶:::::::::::::8888::::::::::::::顶8::::::::::::8888::::::::::顶
....88888..顶:::8::顶顶:::::::::888888::::::::::::顶::::::::::::888888:::::::::顶
....8888...顶顶:::::顶顶::::::::888888::::::::::::顶顶::::::::::888888:::::::::顶
....8888....顶:::::::顶顶::::::::::8888::::::::::::顶顶顶::::::::::8888::::::::::顶'
.....888....顶顶::::::顶顶顶:::::::::::::::::::::::顶顶::顶:::::::::::::::::::::::::顶'
......88.....顶::::::::顶顶顶顶::::::::::::::::顶顶顶::::顶顶::::::::::::::::::::顶'
.......88....顶顶:::::::::顶顶顶顶顶顶顶顶顶顶:::::::::顶顶顶顶顶顶顶顶'
........88....顶顶::::::::::::::顶顶顶顶顶顶顶:::::::::::::::顶顶顶顶顶o'
.........88...8顶顶:::::::::::::::::::::::::::::::::::::::::::::::::::::顶
..........8...88顶顶::::::::::::::::::::::::::::顶:::顶::::::::::::::顶
..............888顶顶::::::::::::::::::::::顶顶::::::顶顶:::::::::顶
.............88888顶顶::::::::::::::::顶顶顶:::::::顶顶:::::::顶
.............888888顶顶::::::::::::::顶顶顶:::::::::顶顶::::顶
............88888888顶顶:::::::::::顶顶顶:::::::::::顶::::顶
...........88.8888888.顶::::::::顶顶顶::::::::::::::顶:::顶
...........8..888888..顶::::::顶顶:::::::::::::::::::顶:::顶
..............888888..顶:::::顶:::::::::::::::::::::顶::顶顶
.............888888...顶::::顶::::::::::::::::::::::::::顶顶
.............888888...顶::::顶:::::::::::::::::::::::::顶:顶
.............88888...顶::::::::::::::8::::::::::::::::::顶::顶
............88888...顶:::::::::::::::88:::::::::::::::::顶::顶
...........88888...顶::::::::::::::::8::::::::::::::::::::顶::顶
..........88888...顶:::::顶:::::::::::::::::::::顶::::::::顶::顶
..........8888...顶:::::顶:::::::::::::::::::::::顶顶::::::顶::顶
.........8888...顶:::::顶:::::::::::::::::::::::顶顶顶:::::::顶:顶
........888....顶:::::顶顶::::::::::::::::::::::顶顶顶::::::::顶:顶
......8888....顶::::::顶顶:::::::::::::::::::::顶顶顶::::::::: 顶:顶
.....888......顶:::::顶:::::::::::::::::::::::::顶顶:::::::::::::::顶:顶
..8888......顶:::::::::::::::::::::::::::::::::顶::::::::::::::::::::顶:顶
.............顶:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::顶:顶
............顶::::::::顶::::::::::::::::::::::::::::::::::::::::::::::::::顶:顶
............顶::::::::顶::::::::::::::::::::::顶:::::::::::::::::::::::::顶:顶
...........顶::::::::::顶::::::::::::::::::::顶::::::::::::::::::::::::::顶:顶
...........顶:::::::::::顶8:::::::::::::8:顶::::::::::::::::::::::::::顶:顶p
...........顶::::::::::::888hole888顶::::::::::::::::::::::::::::顶:顶o
...........顶:::::::::::::88888888顶::::::::::::::::::::::::::::顶:顶p
...........顶::::::::::::::888888顶:::::::::::::::::::::::::::::顶:顶
...........顶:::::::::::::::88888顶::::::::::::::::::::::::::::顶:顶
...........顶:::::::::::::::::88顶::::::::::::::::::::::::::::::顶顶
...........顶:::::::::::::::::::顶::::::::::::::::::::::::::::::顶顶
...........顶:::::::::::::::::::顶::::::::::::::::::::::::::::顶顶
............顶:::::::::::::::::顶:::::::::::::::::::::::::::顶顶
............顶:::::::::::::::::顶:::::::::::::::::::::::::::::顶
.............顶:::::::::::::::顶:::::::::::::::::::::::::::::顶
.............顶:::::::::::::::顶::::::::::::::::::::::::::::顶
..............顶:::::::::::::顶::::::::::::::::::::::::::::顶
..............顶:::::::::::::顶:::::::::::::::::::::::::::顶
...............顶:::::::::::顶:::::::::::::::::::::::::::顶
...............顶:::::::::::顶::::::::::::::::::::::::::顶
................顶:::::::::顶::::::::::::::::::::::::::顶
................顶:::::::::顶:::::::::::::::::::::::::顶
.................顶:::::::顶:::::::::::::::::::::::::顶
..................顶::::::顶::::::::::::::::::::::::顶
..................顶:::::顶::::::::::::::::::::::::顶
...................顶:::顶::::::::::::::::::::::::顶
...................顶::顶::::::::::::::::::::::::顶
....................顶:顶:::::::::::::::::::::::顶
....................顶顶:::::::::::::::::::::::顶
....................顶顶::::::::::::::::::::::顶
....................顶顶:::::::::::::::::::::顶
....................顶顶:::::顶:::::::::顶顶
....................顶顶::::顶顶:::::::顶顶
....................顶顶::::::顶顶:::::顶顶
.....................顶顶:::::::::::::::::顶顶
.....................顶顶::::顶:::::::::::顶顶
......................顶顶::顶顶顶:::::::顶顶
......................顶顶::顶顶顶:::::::顶顶
......................顶顶:::顶顶:::::::::::::顶
.......................顶顶::顶顶:::::::::::::顶
.......................顶顶::顶顶:::::::::::::顶
.......................顶顶:::顶:::::::::::::::顶
.......................顶顶::::::::::::::::::::顶
.......................顶顶::::::::::::::::::::顶
.......................顶顶:::::::::::::::::::顶
.......................顶顶:::::::::::::::::::顶
.......................顶顶::::::::::::::::::顶
........................顶顶:::::::::::::::::顶
........................顶顶:::::::::::::::::顶
........................顶顶:::::::::::::::::顶
........................顶顶:::::::::::::::::顶
........................顶顶:::::::::::::::::顶
.........................顶顶:::::::::::::::顶
.........................顶顶:::::::::::::::顶
.........................顶顶:::::::::::::::顶
.........................顶顶::::::::::::::顶
..........................顶顶:::::::::::::顶
..........................顶顶:::::::::::::顶
..........................顶顶:::::::::::::顶
..........................顶顶::::::::::::顶
..........................顶顶::::::::::::顶
...........................顶顶:::::::::::顶
...........................顶顶::::::::::顶
...........................顶顶::::::::::顶
............................顶顶::::::::顶
............................顶顶::::::::顶
............................顶顶::::::::顶
.............................顶顶:::::::顶
.............................顶顶:::::::顶
..............................顶顶::::::顶
..............................顶顶::::::顶
..............................顶顶::::::顶
..............................顶顶::::::顶
..............................顶顶::::::顶
..............................顶顶::::::顶
.............................顶顶:::::::顶
............................顶:顶::::::::顶
............................顶:顶:::::::::顶
............................顶:顶::::::::::顶
............................顶:顶:::::::::::顶
............................顶:顶::::::::::::顶
............................顶:顶:::::::::::::顶
............................顶:顶::::::::::::::顶
............................顶顶:::::::::::::::::顶
..............................顶顶::::::::::::::::顶
................................顶顶顶:::::::::顶顶
..................................顶顶::顶::::顶顶
...................................顶顶顶顶顶顶顶
小鱼 发表于 2007-5-25 18:00
我想看下哦
kzhying 发表于 2007-5-27 19:40
ddd ,刷粉请见谅学习中 ,刷粉请见谅学习中 ,刷粉请见谅学习中 ,刷粉请见谅学习中 ,刷粉请见谅学习中 ,刷粉请见谅学习中 ,刷粉请见谅学习中 ,刷粉请见谅学习中 ,刷粉请见谅
linyu1984 发表于 2007-5-28 13:12
晕啊 ,我是新来的
linyu1984 发表于 2007-5-28 13:32
不是吧?经验要到60 啊,我的还不够怎么办?
39418080 发表于 2007-5-28 18:59
好好!!!!
fd6172850 发表于 2007-5-29 01:27
好好好好好好
zengyu0512 发表于 2007-5-30 17:15
看看看看
哭求这些啊
370243816 发表于 2007-6-1 18:39
和上任后虽然是如何
w5218 发表于 2007-6-2 15:04
谢谢,lz了.....
tzh2307 发表于 2007-6-3 20:48
可怜我经验不够啊,谁来救我啊
tzh2307 发表于 2007-6-3 21:19
怎么这样啊,大哥,等我一会下阿。
求你了!
tzh2307 发表于 2007-6-3 22:29
这次我的经验应该够了吧,大哥!
shadowfire 发表于 2007-6-4 09:27
好的,支持你顶``