| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 735 人关注过本帖
标题:来高手啊,小弟遇到问题,感激不尽
只看楼主 加入收藏
x21824182
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2007-4-3
收藏
 问题点数:0 回复次数:0 
来高手啊,小弟遇到问题,感激不尽
这个是editqiye.asp文件<!--#include file="conn.asp"-->
<%
id = request("id")
if id = "" then
 conn.close
 set conn = nothing
 response.write "<script>alert('请不要捣乱!!!');top.window.location.href='adminmain.asp';</script>"
end if
sql = "select * from qiye where qiyeid="&id
set rs = server.createobject("adodb.recordset")
rs.open sql,conn,1,1
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<STYLE>TD {
    FONT-SIZE: 9pt; LINE-HEIGHT: 140%
}
BODY {
    FONT-SIZE: 9pt; LINE-HEIGHT: 140%
}
A:link {
    COLOR: #0033cc; TEXT-DECORATION: none
}
A:visited {
    COLOR: #0033cc; TEXT-DECORATION: none
}
A:active {
    COLOR: #ff0000; TEXT-DECORATION: none
}
A:hover {
    COLOR: #000000; TEXT-DECORATION: underline
}
.header    {
font-family: Tahoma, Verdana; font-size: 9pt; color: #FFFFFF; background-color: #00CCCC
}
.category{
font-family: Tahoma, Verdana; font-size: 9pt; color: #000000; background-color: #EFEFEF
}
</STYLE>
<title>编辑企业</title>
</head>
<body text=#000000 bgColor=#ffffff leftMargin=0 topMargin=0>
<br>
<form action="editqiyeok.asp" method="post" )>
<table style="BORDER-COLLAPSE: collapse" borderColor=#808080 width="480" border="1" align="center" cellpadding=1>
<tr><td align="center" class="header" colspan=6>企业信息修改</td></tr>

  <tr>
    <td align="center">单位全称</td>
    <td colspan=5>&nbsp;<input type=text name="qc" size=25 value="<%=rs("qc")%>"> </td>
  </tr>
  <tr>
    <td align="center">详细地址</td>
    <td colspan=3>&nbsp;<input type=text name="dizhi" size=25 value="<%=rs("dizhi")%>"></td>
    <td align="center">邮政编码</td>
    <td colspan=1>&nbsp;<input type=text name="bianma" size=15 value="<%=rs("bianma")%>"></td>
  </tr>
  <tr>
    <td align="center">单位性质</td>
    <td colspan=2>&nbsp;<input type=text name="xingzhi" size=15 value="<%=rs("xingzhi")%>"></td>
    <td align="center">所属行业</td>
    <td colspan=2>&nbsp;<input type=text name="hangye" size=15 value="<%=rs("hangye")%>"></td>
  </tr>
   <tr>
    <td align="center">单位级别</td>
    <td colspan=2>&nbsp;<input type=text name="jibie" size=15 value="<%=rs("jibie")%>"></td>
    <td align="center">隶属上级</td>
    <td colspan=2>&nbsp;<input type=text name="shangji" size=15 value="<%=rs("shangji")%>"></td>
  </tr>
   <tr>
    <td align="center">文明单位级别</td>
    <td colspan=2>&nbsp;<input type=text name="wmjibie" size=15 value="<%=rs("wmjibie")%>"></td>
    <td align="center">命名时间</td>
    <td colspan=2>&nbsp;<input type=text name="shijian" size=15 value="<%=rs("shijian")%>"></td>
  </tr>
  <tr>
    <td align="center">单位总人数</td>
    <td colspan=2>&nbsp;<input type=text name="renshu" size=15 value="<%=rs("renshu")%>"></td>
    <td align="center">党员数</td>
    <td colspan=2>&nbsp;<input type=text name="dangyuan" size=15 value="<%=rs("dangyuan")%>"></td>
  </tr>
   <tr>
    <td align="center">科室数</td>
    <td colspan=2>&nbsp;<input type=text name="keshi" size=15 value="<%=rs("keshi")%>"></td>
    <td align="center">团员数</td>
    <td colspan=2>&nbsp;<input type=text name="tuanyuan" size=15 value="<%=rs("tuanyuan")%>"></td>
  </tr>
   <tr>
    <td align="center">法人代表</td>
    <td colspan=2>&nbsp;<input type=text name="daibiao" size=15 value="<%=rs("daibiao")%>"></td>
    <td align="center">电话</td>
    <td colspan=2>&nbsp;<input type=text name="tel1" size=15 value="<%=rs("tel1")%>"></td>
  </tr>
   <tr>
    <td align="center">党组织负责人</td>
    <td colspan=2>&nbsp;<input type=text name="fuze" size=15 value="<%=rs("fuze")%>"></td>
    <td align="center">电话</td>
    <td colspan=2>&nbsp;<input type=text name="tel2" size=15 value="<%=rs("tel2")%>"></td>
  </tr>
  <tr>
    <td align="center" rowspan=2>创建工作领导</td>
    <td rowspan=2>&nbsp;<input type=text name="lingdao" size=10 value="<%=rs("lingdao")%>"></td>
    <td align="center" rowspan=2>办公电话</td>
    <td rowspan=2>&nbsp;<input type=text name="tel3" size=15 value="<%=rs("tel3")%>"></td>
     <td align="center">手机</td>
    <td colspan=2>&nbsp;<input type=text name="sj1" size=14 value="<%=rs("sj1")%>"></td>
  </tr>
  <tr>
    <td align="center">电子邮箱</td>
    <td colspan=2>&nbsp;<input type=text name="em1" size=14 value="<%=rs("em1")%>"></td>
  </tr>
  <tr>
    <td align="center" rowspan=2>创建工作专干</td>
    <td rowspan=2>&nbsp;<input type=text name="zhuangan" size=10 value="<%=rs("zhuangan")%>"></td>
    <td align="center" rowspan=2>办公电话</td>
    <td rowspan=2>&nbsp;<input type=text name="tel4" size=15 value="<%=rs("tel4")%>"></td>
     <td align="center">手机</td>
    <td colspan=2>&nbsp;<input type=text name="sj2" size=14 value="<%=rs("sj2")%>"></td>
  </tr>
  <tr>
    <td align="center">电子邮箱</td>
    <td colspan=2>&nbsp;<input type=text name="em2" size=14 value="<%=rs("em2")%>"></td>
  </tr>
  <tr>
    <td align="center">主要业务工作</td>
    <td colspan=5>&nbsp;<textarea name="gongzuo" cols="51" rows="6"><%=rs("gongzuo")%></textarea></td>
  </tr>
  <tr>
    <td align="center">主要获奖情况</td>
    <td colspan=5>&nbsp;<textarea name="qingkuang" cols="51" rows="6"><%=rs("qingkuang")%></textarea></td>
  </tr>
  <tr>
    <td align="center">创建过程</td>
    <td colspan=5>&nbsp;<textarea name="guocheng" cols="51" rows="6"><%=rs("guocheng")%></textarea></td>
  </tr>
</table>
<center><br><input type=submit name="submit" value="更新">&nbsp;&nbsp;<input type=button name="fanhui" value="返回" onclick="history.go(-1);"></center>
</form>
</body>
</html>



这个是editqiyeo.asp
<%@ Language=VBScript %>
<!--#include file="conn.asp"-->
<%  
qc = LCase(request("qc"))
dizhi = LCase(request("dizhi"))
bianma = LCase(request("bianma"))
xingzhi = LCase(request("xingzhi"))
hangye = LCase(request("hangye"))
jibie = LCase(request("jibie"))
shangji = LCase(request("shangji"))
wmjibie = LCase(request("wmjibie"))
shijian = LCase(request("shijian"))
renshu = LCase(request("renshu"))
dangyuan = LCase(request("dangyuan"))
keshi = LCase(request("keshi"))
tuanyuan = LCase(request("tuanyuan"))
daibiao = LCase(request("daibiao"))
fuze = LCase(request("fuze"))
lingdao = LCase(request("lingdao"))
zhuangan = LCase(request("zhuangan"))
tel1 = LCase(request("tel1"))
tel2 = LCase(request("tel2"))
tel3 = LCase(request("tel3"))
tel4 = LCase(request("tel4"))
sj1 = LCase(request("sj1"))
sj2 = LCase(request("sj2"))
em1 = LCase(request("em1"))
em2 = LCase(request("em2"))
gongzuo = LCase(request("gongzuo"))
qingkuang = LCase(request("qingkuang"))
guocheng = LCase(request("guocheng"))
id = trim(request("id"))

if qc = "" then
 conn.close
 set conn = nothing
 response.write "<script>alert('请输入单位全称');history.go(-1);</script>"
 response.end
end if

if dizhi = "" then
 conn.close
 set conn = nothing
 response.write "<script>alert('请输入单位的详细地址');history.go(-1);</script>"
 response.end
end if

if daibiao = "" then
 conn.close
 set conn = nothing
 response.write "<script>alert('请输入单位的法人代表');history.go(-1);</script>"
 response.end
end if

if xingzhi = "" then
 conn.close
 set conn = nothing
 response.write "<script>alert('请输入单位性质');history.go(-1);</script>"
 response.end
end if

if hangye = "" then
 conn.close
 set conn = nothing
 response.write "<script>alert('请输入单位所属行业');history.go(-1);</script>"
 response.end
end if
 
 sql = "select * from qiye"
 set rs = server.createobject("adodb.recordset")
 rs.open sql,conn,1,3

 rs("qc")=qc
 rs("dizhi")=dizhi
 rs("bianma")=bianma
 rs("xingzhi")=xingzhi
 rs("hangye")=hangye
 rs("jibie")=jibie
 rs("shangji")=shangji
 rs("wmjibie")=wmjibie
 rs("shijian")=shijian
 rs("renshu")=renshu
 rs("dangyuan")=dangyuan
 rs("keshi")=keshi
 rs("tuanyuan")=tuanyuan
 rs("daibiao")=daibiao
 rs("fuze")=fuze
 rs("lingdao")=lingdao
 rs("zhuangan")=zhuangan
 rs("tel1")=tel1
 rs("tel2")=tel2
 rs("tel3")=tel3
 rs("tel4")=tel4
 rs("sj1")=sj1
 rs("sj2")=sj2
 rs("em1")=em1
 rs("em2")=em2
 rs("gongzuo")=gongzuo
 rs("qingkuang")=qingkuang
 rs("guocheng")=qingkuang


 rs.update
 rs.close
 set rs = nothing
 conn.close
 set conn = nothing
response.write "<script>alert('修改成功');window.location.href='searchqiye.asp?id="&id&"';</script>"
%>


现在就想大家帮我解决一下 怎么把ID值成功的传到editqiyeok.asp
我现在修改数据库成功 总是自动修改数据库最后的一条记录
搜索更多相关主题的帖子: 感激不尽 conn 
2008-05-19 15:45
快速回复:来高手啊,小弟遇到问题,感激不尽
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.045242 second(s), 9 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved