谁帮我看下程序啊,谢谢,老调不好
<!--#include file="../Include/conn.asp"-->
<%
dim action
action=trim(request.form("action"))
if action="save" then
set rs=server.CreateObject("adodb.recordset")
rs.Open "select a,b from c",conn,1,3
rs.addnew()
rs("b")=request.form("dqydbt")
response.Write rs("b")
response.End
rs.update
rs.close
set rs=nothing
response.Write "<script language=javascript>alert('信息添加成功!');history.go(-1);</script>"
else
%>
<title>添加党群园地信息</title>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="1" BGCOLOR="#39867B">
<tr>
<td height="40"> <div align="center"><font color="#ffffff">
添加党群园地信息</font></div></td>
</tr>
<tr>
<td height="107" valign="top" BGCOLOR="#E1F4EE"> <table width="100%" border="0" align="center" cellpadding="3" cellspacing="0">
<form name="form1" method="post" action="test.asp?action=save">
<tr>
<td height="20">
<p align="center">党群园地标题:<input name="dqydbt" type="text" id="dqydbt" size="56"></td>
</tr>
<tr>
<td height="22" > <div align="center">
<input type="submit" name="Submit" value="提 交">
<input name="action" type="hidden" value="save">
</div></td>
</tr>
</form>
</table>
<%rs.Close
set rs=nothing
conn.close
set conn = Nothing
end if
%>
</td>
</tr>
</table>
</body>
</html>
conn.asp
<%
on error resume next
dim conn,connstr,db
db="smxfx.mdb"
c& Server.MapPath(db)
Set conn=Server.CreateObject("ADODB.Connection")
conn.Open connstr
%>
[ 本帖最后由 goodboyhao 于 2007-11-12 09:00 编辑 ]