我是这样写的啊,怎么就是插入不了呢? 代码如下: if request("submit") ="发送" then update gongwen set pishiflag = 1,pishicontent = '"&request("content")&"' where id = "&id end if
... 用 if request("submit") ="发送" then conn.Execute(update gongwen set pishiflag = 1,pishicontent = '"&request("content")&"' where id = "&id ) end if CONN是你连接数据库的对象
if request("submit") ="发送" then updatesql = "update gongwen set pishiflag = 1,pishicontent = '"&request("content")&"' where id = "&id response.write updatesql '看能输出失去了不 ? '查看输出的sql能在数据库执行成功不 ? conn.execute updatesql end if
点击这个页面的"批示" <% call bgmid() set conn=opendb set rs=server.createobject("adodb.recordset") sql="select * from gongwen where sender <>'"&oabusyusername&"'and recipientusername='"& oabusyusername &"' and readflag='未阅读'" rs.open sql,conn,1,1
if not rs.eof and not rs.bof then rs.pagesize=13 if request("page") <>"" then page=clng(request("page")) if page <1 then page=1 if page>rs.pagecount then page=rs.pagecount href="readgongwe_no.asp" rs.absolutepage=page %> <table border="1" cellpadding="4" cellspacing="0" width="95%"> <tr> <td align=center> <b>公文标题 </b> </td> <td align=center > <b>附件 </b> </td> <td align=center > <b>发送者所在部门 </b> </td> <td align=center > <b>发送者 </b> </td> <td align=center > <b>发送日期 </b> </td> <td align=center> <b>批示 </b> </td> </tr> <% for ipage=1 to rs.pagesize %> <tr> <td> <div align="center"> <a href="#" onclick="Javascript:OpenSmallWindows('showgongwen.asp?id= <%=rs("Id")%>')" > <font color=red> <%=rs("title")%> </font> <img src="images/new.gif" border="0"> </a> </div> </td> <td align="center"> <% if rs("fujian")=1 then %> <a href="#" onclick="Javascript:OpenSmallWindows('downgong.asp?id= <%=rs("Id")%>')" > <img src="images/attach.gif" width=25 height=25 border=0 > </a> <% else %>
<td align=center> <a href="senddate111.asp?id= <%=rs("id")%>">批示 </a> </td> </tr> <% rs.movenext if rs.eof then exit for next %> </table>
弹出这个输入页面: <b> 公文批示 </b> <% call bgmid() %>
<% gwid=request("id") set conn1=opendb set rs1=server.createobject("adodb.recordset") sql2="select * from readgongwen where gongwenid ="&gwid &" and readname = '"&oabusyname&"' and readdept = '"&oabusyuserdept&"'" rs1.open sql2,conn1,1,1
gwcount=rs1.recordcount
set conn=opendb Set rs=Server.CreateObject("ADODB.recordset") sql="select * from gongwen where id=" & request("id")
if request("submit") ="发送" then id=request("id") conn.execute "update gongwen set pishiflag = 1 ,answer_date='"&content&"' where id = "&id