荷兰萨克逊大学:哪位高手能帮我分析一下这些代码~~~谢谢了

来源:百度文库 编辑:神马品牌网 时间:2024/05/06 00:43:28
<% language="VBscript"%>
<%
dim name,email,yijian,Cnn,rs,Sm,str,DBPath
name=request.form("name")
email=request.form("contact")
yijian=request.form("words")
DBPath=server.MapPath("database/yijian.mdb")
Sm="DRIVER={Microsoft Access Driver (*.mdb)};DBQ="&DBPath
set Cnn=Server.CreateObject("ADODB.Connection")
Cnn.open Sm
set rs=server.CreateObject("ADODB.RecordSet")
rs.CursorType=1
rs.CursorLocation=2
rs.LockType=3
str="select * from yh"
rs.open str,Cnn
if yijian<>"" then
Rs.AddNew
Rs("姓名")=name
Rs("email")=email
Rs("意见")=yijian
Rs.update
else
response.redirect "huikong.htm"
response.end
end if %>
<%
rs.close
set rs=nothing
Cnn.close%>
<%response.redirect "yijian.asp" %>

<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>**************</title>
</head>

<body>
<div align="center">
<p><font color="#999999" size="7"><strong>考 试 发 布 信 息 </strong></font></p>
<p></p>
<hr width="766" size="0" color="#0033CC">
<table width="766" height="412" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="766" height="412" valign="top">
<form action="liuyantj.asp" method="post" name="form1">
<p><strong>信息类型:</strong>
<select name="sel1" id="sel1" width="100">
<option value="计算机">计算机</option>
<option value="英语">英语</option>
<option value="其他">其他</option>
</select>
</p>
<p><strong>内容题目:
<input name="tm" type="text" id="tm" size="50" maxlength="100" width="500" height="20" border="20">
</strong></p>
<p><strong>具体内容:
<textarea name="nr" cols="70" rows="20" id="nr"></textarea>
<input type="submit" name="Submit" value="确定提交">
<input type="reset" name="Submit2" value="清 除">
</strong></p>
<p> </p>
</form>
</td>
</tr>
  <center><tr><a href="gonggongxxfb.asp">公共信息发布</a>  (<a href="kaoshixxbf.asp">考试信息备份</a>  <a href="ggxxbf.asp">公共信息备份</a>)</tr></center>
</table>
</div>
</body>
</html>

rs.open str,Cnn 后面要有参数吧?
改成:
rs.open str,Cnn 3, 3
试试。