这段代码错在哪里?
<%dim rst,sql
if request.querystring("act")="cf" then
set rst=server.createobject("adodb.recordset")
sql="tbl_affiche"
rst.open sql,conn,1,3
conn.begintrans
rst.addnew
rst("a_title")=request.form("f_title")
rst("a_content")=request.form("f_content")
rst.update
if err.number<>0 then
conn.rollbacktrans
response.write "公告发布失败!错误原因:"&err.description
else
response.write "公告发布成功!"
end if
else
end if
%>
<form method="post" action="admin_affiche.asp?act=cf">
<table width="600" height="214" border="0" cellpadding="0" cellspacing="0">
<tr align="left">
<td height="40" colspan="2">公告系统</td>
</tr>
<tr>
<td width="161" height="40" align="right">公告标题:</td>
<td width="439"><input name="f_title" type="text" class="box"></td>
</tr>
<tr valign="top">
<td align="right">公告内容:</td>
<td><textarea name="f_content" cols="66" rows="12" wrap="OFF"></textarea></td>
</tr>
<tr align="center">
<td height="40" colspan="2"><input type="submit" name="sub" value="提交公告"> <input type="reset" value="清除"></td>
</tr>
</table>
</form>
<%
rst.close
set rst=nothing
conn.close
set conn=nothing
%>
为什么不能写入数据库?