ASP怎么更新ACCRESS

boyanyan001 2005-12-19 12:26:54
我有2个ASP文件,1个cnedit ,1个submit怎么更新呀?
cnedit
<HTML>
<HEAD>
<TITLE>ÐÞ¸Ä</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<style>
body,td,input,textarea {font-size:9pt}
</style>


<script language="javascript">
function getValue(){
var info=myform.myTextArea.value;
alert(info);
}

</script>


</HEAD>
<%
e=request("action")
db="db1.mdb"
Set conn = Server.CreateObject("ADODB.Connection")
connstr="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(""&db&"")
conn.Open connstr
Set rs=Server.CreateObject("ADODB.RecordSet")
%>
<BODY>
<%
rs.open"select * from cnlow where id=1",conn
dim edlow
edlow=rs("clow")
rs.close
%>
<FORM method="POST" name="myform" action="submit.asp">
<TABLE border="0" cellpadding="2" cellspacing="1">
<TR>
<TD>±à¼­ÄÚÈÝ£º</TD>
<TD>
<INPUT type="hidden" name="content1" value="<%=edlow%>">
<IFRAME ID="eWebEditor1" src="../ewebeditor.asp?id=content1&style=s_coolblue" frameborder="0" scrolling="no" width="550" height="350"></IFRAME>
</TD>
</TR>
<TR>
<TD colspan=2 align=right>
<INPUT type=button name=b4 value="ȡֵ" onclick="myTextArea.value=eWebEditor1.getHTML()">
</TD>
</TR>
<TR>
<TD>Ð޸ĵÄÄÚÈÝ£º</TD>
<TD><TEXTAREA cols=50 rows=5 name=myTextArea id=myTextArea style="width:550px" ReadOnly=ture>µã»÷¡°È¡Öµ¡±°´Å¥£¬¿´Ò»ÏÂЧ¹û£¡</TEXTAREA></TD>
<TD>
</TR>
<TR>
<TD colspan=2 align=right>
<INPUT type=submit name=b1 value="±£´æ">
</TD>
</TR>
</TABLE>
</FORM>
</BODY>
</HTML>
...全文
91 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
jspadmin 2005-12-19
  • 打赏
  • 举报
回复
rs("clow")=你想保存的数据或变量 rs.update
ahhisoft 2005-12-19
  • 打赏
  • 举报
回复
update
boyanyan001 2005-12-19
  • 打赏
  • 举报
回复
submit
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=shift_jis">
<title>dasds</title>
</head>
<%
e=request.form("myTextArea")
db="db1.mdb"
Set conn = Server.CreateObject("ADODB.Connection")
connstr="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(""&db&"")
conn.Open connstr
conn.execute("update cnlow set clow='"&e&"' where id=1")
conn.close
response.write("ÄãÒÑÐÞ¸Ä")
%>

<body>
<form name="form1" id="form1" method="post" action="main.asp">
<p>
<input type="submit" name="Submit01" value="·µ»Ø" />
</p>
</form>
</body>
</html>
创造奇迹9999 2005-12-19
  • 打赏
  • 举报
回复
UP了
ybfqlyq 2005-12-19
  • 打赏
  • 举报
回复
rs.open"select * from cnlow where id=1",conn
------>
rs.open"select * from cnlow where id=1",conn,1,3
xx123731 2005-12-19
  • 打赏
  • 举报
回复
set rs=server.createobject("adodb.recordset")
rs.open ........//你的SQL语句,连接
rs("clow")=你想保存的数据或变量
rs.update
这样就行了



xiangyx 2005-12-19
  • 打赏
  • 举报
回复
楼上正解!

28,406

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧