为什么修改不了原来的数据~~~~~~~~~在线独自等待~~~~~~~~
<html>
<head>
<title></title>
</head>
<body>
<%
dim cn,rs,str
set cn=Server.CreateObject("ADODB.Connection")
cn.open="Driver={SQL SERVER};Server=FILESERVER;Database=OA;UID=sa;PWD=kschina918;"
set rs=Server.CreateObject("ADODB.RecordSet")
str = Request.form("sgdwj")
if trim(str)<> "" then
sql = "select * from jlb_ylt where gdwj='"& Request.form("sgdwj") &"'"
else
sql = "select * from jlb_ylt"
end if
rs.open sql,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=100 align=center>实际完成日</td>
<td width=100 align=center>设计人</td>
<td width=100 align=center>审核</td>
<td width=200 align=center>技术备忘</td>
</tr>
<%
if Not rs.Eof then
Do while Not rs.Eof
%>
<tr>
<td width=100 align=center><%=rs(0) %></td>
<td width=100 align=center><%=rs(1) %></td>
<td width=100 align=center><%=rs(2) %></td>
<td width=100 align=center><%=rs(3)%></td>
<td width=100 align=center><%=rs(4)%></td>
<td width=200 align=center><%=rs(5)%></td>
</tr>
<% If not rs.Eof Then rs.MoveNext
Loop
else
%>
<tr>
<td width=100 align=center>无记录</td>
<td width=100 align=center>无记录</td>
<td width=100 align=center>无记录</td>
<td width=100 align=center>无记录</td>
<td width=100 align=center>无记录</td>
<td width=200 align=center>无记录</td>
</tr>
<%end if
rs.close
set rs=nothing
cn.close
set cn=nothing
%>
</table>
<%
dim con,ros
set con=Server.CreateObject("ADODB.Connection")
con.open="Driver={SQL SERVER};Server=FILESERVER;Database=OA;UID=sa;PWD=kschina918;"
set ros=Server.CreateObject("ADODB.RecordSet")
ros.open "select * from jlb_ylt where gdwj='"& Request.form("sgdwj") &"'",con,2,3
%>
<%
ros.addnew //原因好象在这里 这好象是添加 但不知道怎么修改
ros("gdwj")=request.form("sgdwj")
ros("yqwcrq")=request.form("syqwcrq")
ros("sjwcrq")=request.form("ssjwcrq")
ros("sjr")=request.form("ssjr")
ros("sh")=request.form("ssh")
ros("jsbw")=request.form("sjsbw")
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=FILESERVER;Database=OA;UID=sa;PWD=kschina918;"
set rbs=Server.CreateObject("ADODB.RecordSet")
rbs.open "select * from jlb_ylt where gdwj='"& Request.form("sgdwj") &"'",cbn,1,1
%>
<table border=1 align="center">
<tr>
<td width=100 align=center>归档文件</td>
<td width=100 align=center>预期完成日</td>
<td width=100 align=center>实际完成日</td>
<td width=100 align=center>设计人</td>
<td width=100 align=center>审核</td>
<td width=200 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=100 align=center><%=rbs(2) %></td>
<td width=100 align=center><%=rbs(3)%></td>
<td width=100 align=center><%=rbs(4)%></td>
<td width=200 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="jlb_ylt_edit_ch.asp">返回至信息查询</a></td>
<td align=center><a href="jlb_ylt_edit.asp">返回至主页</a></td>
</tr>
</table>
<br>
<hr width=80% color=green>
</body>
</html>
ros.addnew //原因好象在这里 这好象是添加 但不知道怎么修改
请大家帮我看看
谢谢了