📄 cjxg.asp
字号:
<html>
<head>
<title></title>
</head>
<body background="bg.gif" bgproperties="fixed">
<%
dim cn,rs
set cn=Server.CreateObject("ADODB.Connection")
cn.open="Driver={SQL SERVER};Server=SUNZY;Database=xuexi;UID=sa;PWD=;"
set rs=Server.CreateObject("ADODB.RecordSet")
rs.open "select * from 成绩 where 姓名='"& Request.form("txtname") &"'",cn,1,1
%>
<br>
<br>
恭喜,你的记录修改成功:<br>
<p align=center>修改前记录为:</p><br>
<table border=1 align="center">
<tr>
<td width=100 align=center>姓名</td>
<td width=100 align=center>操作系统</td>
<td width=80 align=center>数据库技术</td>
<td width=100 align=center>计算机组成</td>
<td width=200 align=center>计算机网络</td>
<td width=100 align=center>JAVA</td>
<td width=100 align=center>数据库原理</td>
</tr>
<%
Do while Not rs.Eof
%><tr>
<td width=100 align=center><%=rs(0) %></td>
<td width=100 align=center><%=rs(1) %></td>
<td width=80 align=center><%=rs(2) %></td>
<td width=100 align=center><%=rs(3)%></td>
<td width=200 align=center><%=rs(4)%></td>
<td width=100 align=center><%=rs(5)%></td>
<td width=100 align=center><%=rs(6)%></td>
</tr>
<% If not rs.Eof Then rs.MoveNext
Loop
%>
</table><%
rs.close
set rs=nothing
cn.close
set cn=nothing
%>
<%
dim con,ros
set con=Server.CreateObject("ADODB.Connection")
con.open="Driver={SQL SERVER};Server=SUNZY;Database=xuexi;UID=sa;PWD=;"
set ros=Server.CreateObject("ADODB.RecordSet")
ros.open "select * from 成绩 where 姓名='"& Request.form("txtname") &"'",con,2,3
%>
<%
ros("操作系统")=request.form("txtno")
ros("数据库技术")=request.form("txtsex")
ros("计算机组成")=request.form("txtsr")
ros("计算机网络")=request.form("txtdz")
ros("JAVA")=request.form("txtqq")
ros("数据库原理")=request.form("txtsjkyl")
ros.update
%>
<%
ros.close
set ros=nothing
con.close
set con=nothing
%>
<p align=center>修改后记录为:</p><br>
<%
dim cbn,rbs
set cbn=Server.CreateObject("ADODB.Connection")
cbn.open="Driver={SQL SERVER};Server=SUNZY;Database=xuexi;UID=sa;PWD=;"
set rbs=Server.CreateObject("ADODB.RecordSet")
rbs.open "select * from 成绩 where 姓名='"& Request.form("txtname") &"'",cbn,1,1
%>
<table border=1 align="center">
<tr>
<td width=100 align=center>姓名</td>
<td width=100 align=center>操作系统</td>
<td width=80 align=center>数据库技术</td>
<td width=100 align=center>计算机组成</td>
<td width=200 align=center>计算机网络</td>
<td width=100 align=center>JAVA</td>
<td width=100 align=center>数据库原理</td>
</tr>
<%
Do while Not rbs.Eof
%><tr>
<td width=100 align=center><%=rbs(0) %></td>
<td width=100 align=center><%=rbs(1) %></td>
<td width=80 align=center><%=rbs(2) %></td>
<td width=100 align=center><%=rbs(3)%></td>
<td width=200 align=center><%=rbs(4)%></td>
<td width=100 align=center><%=rbs(5)%></td>
<td width=100 align=center><%=rbs(5)%></td>
</tr>
<% If not rbs.Eof Then rbs.MoveNext
Loop
%>
</table><%
rbs.close
set rbs=nothing
cbn.close
set cbn=nothing
%>
<br><br><br><br>
<table align=center width=60% color=green>
<tr>
<td align=center><a href="cjcxcjcx.asp">返回至成绩查询</a></td>
<td align=center><a href="index.asp">返回至主页</a></td>
</tr>
</table>
<br>
<hr width=80% color=green>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -