关于asp+access更新数据的问题?

来源:百度知道 编辑:UC知道 时间:2024/04/27 00:51:57
我检查了几遍字段名都是对的,但为什么会出现行有错误啊?
我有个是关于日志更新的页,代码和这个完全一样,表的设置也一样,但为什么那个没事,这个会出现这个情况呢?

F_gonggao_add.asp页
<form action="../aspcode/gonggao_add.asp" method="post" name="GG_add" id="GG_add">
<div class="R_title">公告更新</div>
<p><label class="R_text">标题:</label>
<input type="text" size="20" name="news_title" />
</p>
<p><label class="R_text">内容:</label>
<textarea cols="60" rows="10" name="news_content"></textarea>
</p>
<p class="tijiao_center"><input type="submit" value="提交" class="button"></p>
</form>

gonggao_add.asp页
<!-- #include file="../conn2.asp" -->
<%
set rs=server.CreateObject("ADODB.Recordset")

<!-- #include file="../conn2.asp" -->
这个应该是问题文件.试试这个

<%
Dim conn,ConnStr,db
db = "数据库路径"
Set conn = Server.CreateObject("ADODB.Connection")
ConnStr = "Provider = Microsoft.Jet.OLEDB.4.0; Data Source =" & Server.MapPath(db)
If Err then
Err.clear
Else
conn.open ConnStr
End if
%>